diff --git a/.gitignore b/.gitignore
index f26e04d0b..e90afb79f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ Gemfile.lock
*~
*.swp
hosts.cfg
+vendor/
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 30d1fab24..9d569f77c 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,39 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
+## [1.8.0] - 2017-12-12
+
+### New feature support
+#### Cisco Resources
+- `cisco_object_group` type and provider.
+- `cisco_object_group_entry` type and provider.
+
+### Added
+
+### Changed
+- `cisco_interface` Refactored to allow physical ethernet interfaces to be managed as ensurable resources.
+ - `ensure => absent` for physical interfaces will put the interface into a default state.
+ - `ensure => absent` for logical interfaces will cause them to be destroyed.
+
+- Extend `syslog_server` with attribute:
+ - `port`
+
+- Extend `syslog_settings` with attributes:
+ - `console`
+ - `monitor`
+ - `source_interface`
+ - `vrf`
+
+- Extend `radius_global` with attribute:
+ - `source_interface`
+
+- Extend `tacacs_global` with attribute:
+ - `source_interface`
+
+### Removed
+
+### Resolved Issues
+
## [1.7.0] - 2017-05-31
### New feature support
@@ -408,6 +441,7 @@ This version was never released.
- Initial release of puppetlabs-ciscopuppet module, supporting Cisco NX-OS software release 7.0(3)I2(1) on Cisco Nexus switch platforms: N95xx, N93xx, N30xx and N31xx.
- Please note: 0.9.0 is an EFT pre-release for a limited audience with access to NX-OS 7.0(3)I2(1). Additional code changes may occur in 0.9.x prior to the final 1.0.0 release.
+[1.8.0]: https://github.com/cisco/cisco-network-puppet-module/compare/v1.7.0...v1.8.0
[1.7.0]: https://github.com/cisco/cisco-network-puppet-module/compare/v1.6.0...v1.7.0
[1.6.0]: https://github.com/cisco/cisco-network-puppet-module/compare/v1.5.0...v1.6.0
[1.5.0]: https://github.com/cisco/cisco-network-puppet-module/compare/v1.4.1...v1.5.0
diff --git a/Gemfile b/Gemfile
index a406af5fd..048cdd893 100644
--- a/Gemfile
+++ b/Gemfile
@@ -65,6 +65,11 @@ group :development, :unit_tests do
gem 'pry', require: false
gem 'rubocop', '= 0.35.1', require: false
gem 'simplecov', require: false
+ gem 'puppet-blacksmith', '~> 3.4', require: false
+end
+
+group :puppet_test_env do
+ gem 'beaker-abs', require: false
end
# vim:ft=ruby
diff --git a/README.md b/README.md
index d852616ad..235ba6bf8 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,9 @@
1. [Module Description](#module-description)
1. [Setup](#setup)
+ * [Puppet Master](#setup-puppet-master)
+ * [Puppet Agent](#setup-puppet-agent)
+ * [Puppet Agent Authentication](#setup-agent-auth)
1. [Example Manifests](#example-manifests)
1. [Resource Reference](#resource-reference)
* [Resource Type Catalog (by Technology)](#resource-by-tech)
@@ -29,7 +32,7 @@ Contributions to the `ciscopuppet` module are welcome. See [CONTRIBUTING.md][DEV
## Setup
-#### Puppet Master
+### Puppet Master
The `ciscopuppet` module must be installed on the Puppet Master server.
@@ -43,7 +46,7 @@ For more information on Puppet module installation see [Puppet Labs: Installing
PuppetLabs provides NetDev resource support for Cisco Nexus devices with their [`puppetlabs-netdev-stdlib`](https://forge.puppet.com/puppetlabs/netdev_stdlib) module. Installing the `ciscopuppet` module automatically installs both the `ciscopuppet` and `netdev_stdlib` modules.
-#### Puppet Agent
+### Puppet Agent
The Puppet Agent requires installation and setup on each device. Agent setup can be performed as a manual process or it may be automated. For more information please see the [README-agent-install.md][USER-1] document for detailed instructions on agent installation and configuration on Cisco Nexus devices.
@@ -94,6 +97,44 @@ Once installed, the GEM will remain persistent across system reloads within the
See [General Documentation](#general-documentation) for information on Guestshell and OAC.
+### Puppet Agent Authentication
+
+Puppet makes use of the nxos `admin` user by default for all types in this module. If a different user is required for puppet agent runs then the following procedure can be used to override `admin` with the desired user.
+
+**NOTE:** The user you select must already be configured on your device with the role `network-admin`.
+
+First create a different user with the role `network-admin`.
+
+~~~
+config term
+ username puppetuser password puppet role network-admin
+end
+~~~
+
+Next create a file called `cisco_node_utils.yaml` under the `modules/ciscopuppet/files` directory on the puppet server and add a cookie `puppetuser:local` under the `default:` yaml key.
+
+```bash
+puppetserver:> cat /etc/puppetlabs/code/environments/production/modules/ciscopuppet/files/cisco_node_utils.yaml
+default:
+ cookie: 'puppetuser:local'
+puppetserver:>
+```
+
+Now create and apply the following manifest on your nxos devices.
+
+~~~puppet
+ $cookie_src = "puppet:///modules/ciscopuppet/cisco_node_utils.yaml"
+ $cookie_tgt = "/${::identity['user']}/cisco_node_utils.yaml"
+
+ file { $cookie_tgt :
+ ensure => file,
+ source => $cookie_src,
+ owner => 'root',
+ group => 'root',
+ mode => 'ug+rwx',
+ }
+~~~
+
## Example Manifests
This module has dependencies on the [`cisco_node_utils`](https://rubygems.org/gems/cisco_node_utils) ruby gem. After installing the Puppet Agent software, use Puppet's built-in [`Package`](https://github.com/cisco/cisco-network-puppet-module/blob/master/examples/install.pp#L17) provider to install the gem.
@@ -215,6 +256,10 @@ The following resources include cisco types and providers along with cisco provi
* [`ntp_config (netdev_stdlib)`](#type-ntp_config)
* [`ntp_server (netdev_stdlib)`](#type-ntp_server)
+* ObjectGroup Types
+ * [`cisco_object_group`](#type-cisco_object_group)
+ * [`cisco_object_group_entry`](#type-cisco_object_group_entry)
+
* OSPF Types
* [`cisco_vrf`](#type-cisco_vrf)
* [`cisco_ospf`](#type-cisco_ospf)
@@ -321,6 +366,8 @@ The following resources include cisco types and providers along with cisco provi
* [`cisco_itd_device_group`](#type-cisco_itd_device_group)
* [`cisco_itd_device_group_node`](#type-cisco_itd_device_group_node)
* [`cisco_itd_service`](#type-cisco_itd_service)
+* [`cisco_object_group`](#type-cisco_object_group)
+* [`cisco_object_group_entry`](#type-cisco_object_group_entry)
* [`cisco_ospf`](#type-cisco_ospf)
* [`cisco_ospf_area`](#type-cisco_ospf_area)
* [`cisco_ospf_area_vlink`](#type-cisco_ospf_area_vlink)
@@ -388,6 +435,7 @@ Platform | Description | Environments
:--|:--|:--
**N9k** | Support includes all N9xxx models | bash-shell, guestshell
**N3k** | Support includes N30xx and N31xx models only.
The N35xx model is not supported. | bash-shell, guestshell
+**N3k-F** | Support includes all N3xxx models running os version 7.0(3)Fx(x) | bash-shell, guestshell
**N5k** | Support includes N56xx models only.
The N50xx and N55xx models are not supported at this time. | Open Agent Container (OAC)
**N6k** | Support includes all N6xxx models | Open Agent Container (OAC)
**N7k** | Support includes all N7xxx models | Open Agent Container (OAC)
@@ -404,94 +452,96 @@ Symbol | Meaning | Description
**Support Matrix**
-| ✅ = Supported
➖ = Not Applicable | N9k | N3k | N5k | N6k | N7k | N9k-F | Caveats |
-|:---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
-| [cisco_aaa_
authentication_login](#type-cisco_aaa_authentication_login) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_aaa_
authorization_login_cfg_svc](#type-cisco_aaa_authorization_login_cfg_svc) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_aaa_
authorization_login_exec_svc](#type-cisco_aaa_authorization_login_exec_svc) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_aaa_group_tacacs](#type-cisco_aaa_group_tacacs) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_acl](#type-cisco_acl) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_ace](#type-cisco_ace) | ✅ | ✅ | ✅* | ✅* | ✅* | ✅ | \*[caveats](#cisco_ace-caveats) |
-| [cisco_bfd_global](#type-cisco_bfd_global) | ✅* | ✅* | ✅* | ✅* | ✅* | ✅* | \*[caveats](#cisco_bfd_global-caveats) |
-| [cisco_command_config](#type-cisco_command_config) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_bgp](#type-cisco_bgp) | ✅ | ✅ | ✅* | ✅* | ✅* | ✅ | \*[caveats](#cisco_bgp-caveats) |
-| [cisco_bgp_af](#type-cisco_bgp_af) | ✅* | ✅* | ✅ | ✅* | ✅ | ✅ | \*[caveats](#cisco_bgp_af-caveats) |
-| [cisco_bgp_af_aa](#type-cisco_bgp_af_aa) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_bgp_neighbor](#type-cisco_bgp_neighbor) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_bgp_neighbor_af](#type-cisco_bgp_neighbor_af) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_bridge_domain](#type-cisco_bridge_domain) | ➖ | ➖ | ➖ | ➖ | ✅ | ➖ |
-| [cisco_bridge_domain_vni](#type-cisco_bridge_domain_vni) | ➖ | ➖ | ➖ | ➖ | ✅ | ➖ |
-| [cisco_dhcp_relay_global](#type-cisco_dhcp_relay_global) | ✅* | ✅* | ✅* | ✅* | ✅* | ✅* | \*[caveats](#cisco_dhcp_relay_global-caveats)
-| [cisco_encapsulation](#type-cisco_encapsulation) | ➖ | ➖ | ➖ | ➖ | ✅ | ➖ |
-| [cisco_evpn_vni](#type-cisco_evpn_vni) | ✅ | ➖ | ✅ | ✅ | ✅ | ✅ | \*[caveats](#cisco_evpn_vni-caveats) |
-| [cisco_fabricpath_global](#type-cisco_fabricpath_global) | ➖ | ➖ | ✅ | ✅ | ✅* | ➖ | \*[caveats](#cisco_fabricpath_global-caveats) |
-| [cisco_fabricpath_topology](#type-cisco_fabricpath_topology) | ➖ | ➖ | ✅ | ✅ | ✅ | ➖ |
-| [cisco_hsrp_global](#type-cisco_hsrp_global) | ✅ | ✅* | ✅ | ✅ | ✅ | ✅ | \*[caveats](#cisco_hsrp_global-caveats) |
-| [cisco_interface](#type-cisco_interface) | ✅* | ✅* | ✅* | ✅* | ✅* | ✅* | \*[caveats](#cisco_interface-caveats) |
-| [cisco_interface_channel_group](#type-cisco_interface_channel_group) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | \*[caveats](#cisco_interface_channel_group-caveats) |
-| [cisco_interface_hsrp_group](#type-cisco_interface_hsrp_group) | ✅ | ✅ | ➖ | ➖ | ✅* | ✅ | \*[caveats](#cisco_interface_hsrp_group-caveats) |
-| [cisco_interface_ospf](#type-cisco_interface_ospf) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_interface_portchannel](#type-cisco_interface_portchannel) | ✅* | ✅* | ✅* | ✅* | ✅* | ✅ | \*[caveats](#cisco_interface_portchannel-caveats) |
-| [cisco_interface_service_vni](#type-cisco_interface_service_vni) | ➖ | ➖ | ➖ | ➖ | ✅ | ➖ |
-| [cisco_itd_device_group](#type-cisco_itd_device_group) | ✅ | ➖ | ➖ | ➖ | ✅ | ➖ |
-| [cisco_itd_device_group_node](#type-cisco_itd_device_group_node) | ✅ | ➖ | ➖ | ➖ | ✅ | ➖ |
-| [cisco_itd_service](#type-cisco_itd_service) | ✅ | ➖ | ➖ | ➖ | ✅ | ➖ | \*[caveats](#cisco_itd_service-caveats) |
-| [cisco_ospf](#type-cisco_ospf) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_ospf_vrf](#type-cisco_ospf_vrf) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| ✅ = Supported
➖ = Not Applicable | N9k | N3k | N5k | N6k | N7k | N9k-F | Caveats |
-| [cisco_overlay_global](#type-cisco_overlay_global) | ✅ | ✅* | ✅ | ✅ | ✅ | ✅ | \*[caveats](#cisco_overlay_global-caveats) |
-| [cisco_pim](#type-cisco_pim) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | \*[caveats](#cisco_pim-caveats) |
-| [cisco_pim_rp_address](#type-cisco_pim_rp_address) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_pim_grouplist](#type-cisco_pim_grouplist) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_portchannel_global](#type-cisco_portchannel_global) | ✅* | ✅* | ✅* | ✅* | ✅* | ✅* | \*[caveats](#cisco_portchannel_global-caveats) |
-| [cisco_route_map](#type-cisco_route_map) | ✅* | ✅* | ✅* | ✅* | ✅* | ✅* | \*[caveats](#cisco_route_map-caveats) |
-| [cisco_stp_global](#type-cisco_stp_global) | ✅* | ✅* | ✅* | ✅* | ✅ | ✅ | \*[caveats](#cisco_stp_global-caveats) |
-| [cisco_snmp_community](#type-cisco_snmp_community) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_snmp_group](#type-cisco_snmp_group) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_snmp_server](#type-cisco_snmp_server) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_snmp_user](#type-cisco_snmp_user) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_tacacs_server](#type-cisco_tacacs_server) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_tacacs_server_host](#type-cisco_tacacs_server_host) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_upgrade](type-cisco_upgrade) | ✅* | ✅* | ➖ | ➖ | ➖ | ✅* | \*[caveats](#cisco_upgrade-caveats) |
-| [cisco_vdc](#type-cisco_vdc) | ➖ | ➖ | ➖ | ➖ | ✅ | ➖ |
-| [cisco_vlan](#type-cisco_vlan) | ✅* | ✅* | ✅ | ✅ | ✅ | ✅ | \*[caveats](#cisco_vlan-caveats) |
+| ✅ = Supported
➖ = Not Applicable | N9k | N3k | N5k | N6k | N7k | N9k-F | N3k-F | Caveats |
+|:---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
+| [cisco_aaa_
authentication_login](#type-cisco_aaa_authentication_login) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_aaa_
authorization_login_cfg_svc](#type-cisco_aaa_authorization_login_cfg_svc) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_aaa_
authorization_login_exec_svc](#type-cisco_aaa_authorization_login_exec_svc) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_aaa_group_tacacs](#type-cisco_aaa_group_tacacs) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_acl](#type-cisco_acl) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_ace](#type-cisco_ace) | ✅ | ✅ | ✅* | ✅* | ✅* | ✅ | ✅ | \*[caveats](#cisco_ace-caveats) |
+| [cisco_bfd_global](#type-cisco_bfd_global) | ✅* | ✅* | ✅* | ✅* | ✅* | ✅* | ✅* | \*[caveats](#cisco_bfd_global-caveats) |
+| [cisco_command_config](#type-cisco_command_config) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_bgp](#type-cisco_bgp) | ✅ | ✅ | ✅* | ✅* | ✅* | ✅ | ✅ | \*[caveats](#cisco_bgp-caveats) |
+| [cisco_bgp_af](#type-cisco_bgp_af) | ✅* | ✅* | ✅ | ✅* | ✅ | ✅ | ✅ | \*[caveats](#cisco_bgp_af-caveats) |
+| [cisco_bgp_af_aa](#type-cisco_bgp_af_aa) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_bgp_neighbor](#type-cisco_bgp_neighbor) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_bgp_neighbor_af](#type-cisco_bgp_neighbor_af) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_bridge_domain](#type-cisco_bridge_domain) | ➖ | ➖ | ➖ | ➖ | ✅ | ➖ | ➖ |
+| [cisco_bridge_domain_vni](#type-cisco_bridge_domain_vni) | ➖ | ➖ | ➖ | ➖ | ✅ | ➖ | ➖ |
+| [cisco_dhcp_relay_global](#type-cisco_dhcp_relay_global) | ✅* | ✅* | ✅* | ✅* | ✅* | ✅* | ✅* | \*[caveats](#cisco_dhcp_relay_global-caveats)
+| [cisco_encapsulation](#type-cisco_encapsulation) | ➖ | ➖ | ➖ | ➖ | ✅ | ➖ | ➖ |
+| [cisco_evpn_vni](#type-cisco_evpn_vni) | ✅ | ➖ | ✅ | ✅ | ✅ | ✅ | ✅ | \*[caveats](#cisco_evpn_vni-caveats) |
+| [cisco_fabricpath_global](#type-cisco_fabricpath_global) | ➖ | ➖ | ✅ | ✅ | ✅* | ➖ | ➖ | \*[caveats](#cisco_fabricpath_global-caveats) |
+| [cisco_fabricpath_topology](#type-cisco_fabricpath_topology) | ➖ | ➖ | ✅ | ✅ | ✅ | ➖ | ➖ |
+| [cisco_hsrp_global](#type-cisco_hsrp_global) | ✅ | ✅* | ✅ | ✅ | ✅ | ✅ | ✅ | \*[caveats](#cisco_hsrp_global-caveats) |
+| [cisco_interface](#type-cisco_interface) | ✅* | ✅* | ✅* | ✅* | ✅* | ✅* | ✅* | \*[caveats](#cisco_interface-caveats) |
+| [cisco_interface_channel_group](#type-cisco_interface_channel_group) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | \*[caveats](#cisco_interface_channel_group-caveats) |
+| [cisco_interface_hsrp_group](#type-cisco_interface_hsrp_group) | ✅ | ✅ | ➖ | ➖ | ✅* | ✅ | ✅ | \*[caveats](#cisco_interface_hsrp_group-caveats) |
+| [cisco_interface_ospf](#type-cisco_interface_ospf) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_interface_portchannel](#type-cisco_interface_portchannel) | ✅* | ✅* | ✅* | ✅* | ✅* | ✅ | ✅ | \*[caveats](#cisco_interface_portchannel-caveats) |
+| [cisco_interface_service_vni](#type-cisco_interface_service_vni) | ➖ | ➖ | ➖ | ➖ | ✅ | ➖ | ➖ |
+| [cisco_itd_device_group](#type-cisco_itd_device_group) | ✅ | ➖ | ➖ | ➖ | ✅ | ➖ | ➖ |
+| [cisco_itd_device_group_node](#type-cisco_itd_device_group_node) | ✅ | ➖ | ➖ | ➖ | ✅ | ➖ | ➖ |
+| [cisco_itd_service](#type-cisco_itd_service) | ✅ | ➖ | ➖ | ➖ | ✅ | ➖ | ➖ | \*[caveats](#cisco_itd_service-caveats) |
+| [cisco_object_group](#type-cisco_object_group) | ✅ | ✅ | ➖ | ➖ | ✅ | ✅ | ✅ |
+| [cisco_object_group_entry](#type-cisco_object_group_entry) | ✅ | ✅ | ➖ | ➖ | ✅ | ✅ | ✅ |
+| [cisco_ospf](#type-cisco_ospf) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_ospf_vrf](#type-cisco_ospf_vrf) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| ✅ = Supported
➖ = Not Applicable | N9k | N3k | N5k | N6k | N7k | N9k-F | N3k-F | Caveats |
+| [cisco_overlay_global](#type-cisco_overlay_global) | ✅ | ✅* | ✅ | ✅ | ✅ | ✅ | ✅ | \*[caveats](#cisco_overlay_global-caveats) |
+| [cisco_pim](#type-cisco_pim) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | \*[caveats](#cisco_pim-caveats) |
+| [cisco_pim_rp_address](#type-cisco_pim_rp_address) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_pim_grouplist](#type-cisco_pim_grouplist) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_portchannel_global](#type-cisco_portchannel_global) | ✅* | ✅* | ✅* | ✅* | ✅* | ✅* | ✅* | \*[caveats](#cisco_portchannel_global-caveats) |
+| [cisco_route_map](#type-cisco_route_map) | ✅* | ✅* | ✅* | ✅* | ✅* | ✅* | ✅* | \*[caveats](#cisco_route_map-caveats) |
+| [cisco_stp_global](#type-cisco_stp_global) | ✅* | ✅* | ✅* | ✅* | ✅ | ✅ | ✅ | \*[caveats](#cisco_stp_global-caveats) |
+| [cisco_snmp_community](#type-cisco_snmp_community) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_snmp_group](#type-cisco_snmp_group) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_snmp_server](#type-cisco_snmp_server) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_snmp_user](#type-cisco_snmp_user) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_tacacs_server](#type-cisco_tacacs_server) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_tacacs_server_host](#type-cisco_tacacs_server_host) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_upgrade](type-cisco_upgrade) | ✅* | ✅* | ➖ | ➖ | ➖ | ✅* | ✅* | \*[caveats](#cisco_upgrade-caveats) |
+| [cisco_vdc](#type-cisco_vdc) | ➖ | ➖ | ➖ | ➖ | ✅ | ➖ | ➖ | ➖ |
+| [cisco_vlan](#type-cisco_vlan) | ✅* | ✅* | ✅ | ✅ | ✅ | ✅ | ✅ | \*[caveats](#cisco_vlan-caveats) |
| [cisco_vpc_domain](#type-cisco_vpc_domain) | ✅* | ✅* | ✅* | ✅* | ✅* | ➖ | \*[caveats](#cisco_vpc_domain-caveats) |
-| [cisco_vrf](#type-cisco_vrf) | ✅ | ✅* | ✅ | ✅ | ✅ | ✅ | \*[caveats](#cisco_vrf-caveats) |
-| [cisco_vrf_af](#type-cisco_vrf_af) | ✅ | ✅* | ✅* | ✅* | ✅* | ✅ | \*[caveats](#cisco_vrf_af-caveats) |
-| [cisco_vtp](#type-cisco_vtp) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [cisco_vxlan_vtep](#type-cisco_vxlan_vtep) | ✅ | ➖ | ✅ | ✅ | ✅* | ✅ | \*[caveats](#cisco_vxlan_vtep-caveats) |
-| [cisco_vxlan_vtep_vni](#type-cisco_vxlan_vtep_vni) | ✅ | ➖ | ✅ | ✅ | ✅ | ✅ | \*[caveats](#cisco_vxlan_vtep_vni-caveats) |
+| [cisco_vrf](#type-cisco_vrf) | ✅ | ✅* | ✅ | ✅ | ✅ | ✅ | ✅ | \*[caveats](#cisco_vrf-caveats) |
+| [cisco_vrf_af](#type-cisco_vrf_af) | ✅ | ✅* | ✅* | ✅* | ✅* | ✅ | ✅ | \*[caveats](#cisco_vrf_af-caveats) |
+| [cisco_vtp](#type-cisco_vtp) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [cisco_vxlan_vtep](#type-cisco_vxlan_vtep) | ✅ | ➖ | ✅ | ✅ | ✅* | ✅ | ✅ | \*[caveats](#cisco_vxlan_vtep-caveats) |
+| [cisco_vxlan_vtep_vni](#type-cisco_vxlan_vtep_vni) | ✅ | ➖ | ✅ | ✅ | ✅ | ✅ | ✅ | \*[caveats](#cisco_vxlan_vtep_vni-caveats) |
##### NetDev Providers
-| ✅ = Supported
➖ = Not Applicable | N9k | N3k | N5k | N6k | N7k | N9k-F | Caveats |
-|:---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
-| [domain_name](#type-domain_name) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [name_server](#type-name_server) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [network_dns](#type-network_dns) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [network_interface](#type-network_interface) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [network_snmp](#type-network_snmp) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [network_trunk](#type-network_trunk) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [network_vlan](#type-network_vlan) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [ntp_auth_key](#type-ntp_auth_key) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [ntp_config](#type-ntp_config) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | \*[caveats](#ntp_config-caveats)
-| [ntp_server](#type-ntp_server) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | \*[caveats](#ntp_server-caveats)
-| [port_channel](#type-port_channel) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [radius](#type-radius) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [radius_global](#type-radius_global) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [radius_server_group](#type-tacacs_server_group) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [radius_server](#type-radius_server) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [search_domain](#type-search_domain) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [snmp_community](#type-snmp_community) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [snmp_notification](#type-snmp_notification) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [snmp_notification_receiver](#type-snmp_notification_receiver) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [snmp_user](#type-snmp_user) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [syslog_server](#type-syslog_server) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [syslog_setting](#type-syslog_setting) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [tacacs](#type-tacacs) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [tacacs_global](#type-tacacs_global) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [tacacs_server](#type-tacacs_server) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
-| [tacacs_server_group](#type-tacacs_server_group) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| ✅ = Supported
➖ = Not Applicable | N9k | N3k | N5k | N6k | N7k | N9k-F | N3k-F | Caveats |
+|:---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
+| [domain_name](#type-domain_name) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [name_server](#type-name_server) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [network_dns](#type-network_dns) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [network_interface](#type-network_interface) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [network_snmp](#type-network_snmp) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [network_trunk](#type-network_trunk) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [network_vlan](#type-network_vlan) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [ntp_auth_key](#type-ntp_auth_key) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [ntp_config](#type-ntp_config) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | \*[caveats](#ntp_config-caveats)
+| [ntp_server](#type-ntp_server) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | \*[caveats](#ntp_server-caveats)
+| [port_channel](#type-port_channel) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [radius](#type-radius) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [radius_global](#type-radius_global) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [radius_server_group](#type-tacacs_server_group) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [radius_server](#type-radius_server) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [search_domain](#type-search_domain) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [snmp_community](#type-snmp_community) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [snmp_notification](#type-snmp_notification) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [snmp_notification_receiver](#type-snmp_notification_receiver) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [snmp_user](#type-snmp_user) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [syslog_server](#type-syslog_server) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [syslog_setting](#type-syslog_setting) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [tacacs](#type-tacacs) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [tacacs_global](#type-tacacs_global) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [tacacs_server](#type-tacacs_server) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| [tacacs_server_group](#type-tacacs_server_group) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
--
### Cisco Resource Type Details
@@ -511,6 +561,7 @@ Allows execution of configuration commands.
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Parameters
@@ -543,6 +594,7 @@ Manages AAA Authentication Login configuration.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Parameters
@@ -577,6 +629,7 @@ Manages configuration for Authorization Login Config Service.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Parameters
@@ -605,6 +658,7 @@ Manages configuration for Authorization Login Exec Service.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Parameters
@@ -633,6 +687,7 @@ Manages configuration for a TACACS+ server group.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Parameters
@@ -679,7 +734,7 @@ Manages configuration of a Access Control List (ACL) instance.
Determines whether the config should be present or not on the device. Valid values are 'present' and 'absent'.
##### `afi`
-Address Family Identifier (AFI). Required. Valid values are ipv4 and ipv6.
+Address Family Identifier (AFI). Required. Valid values are 'ipv4' and 'ipv6'.
##### `acl_name`
Name of the acl instance. Valid values are string.
@@ -757,7 +812,7 @@ cisco_ace { 'ipv6 my_v6_acl 42':
| `cisco_ace { 'ipv4 my_acl 42':`
##### `afi`
-Address Family Identifier (AFI). Required. Valid values are ipv4 and ipv6.
+Address Family Identifier (AFI). Required. Valid values are 'ipv4' and 'ipv6'.
##### `acl_name`
Access Control List (ACL) name. Required. Valid values are type String.
@@ -969,15 +1024,16 @@ Manages configuration of a BFD (Bidirectional Forwarding Detection) instance.
| N6k | 7.3(0)N1(1) | 1.4.0 |
| N7k | 7.3(0)D1(1) | 1.4.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Caveats
| Property | Caveat Description |
|:--------|:-------------|
| `echo_rx_interval` | Not supported on N5k, N6k |
-| `fabricpath_interval` | Not supported on N3k, N9k-F, N9k |
-| `fabricpath_slow_timer` | Not supported on N3k, N9k-F, N9k |
-| `fabricpath_vlan` | Not supported on N3k, N9k-F, N9k |
+| `fabricpath_interval` | Not supported on N3k, N3k-F, N9k-F, N9k |
+| `fabricpath_slow_timer` | Not supported on N3k, N3k-F, N9k-F, N9k |
+| `fabricpath_vlan` | Not supported on N3k, N3k-F, N9k-F, N9k |
| `interval` | Supported on N3k, N5k, N6k, N7k
Supported in OS Version 7.0(3)F2(1) and later on N9k-F
Supported in OS Version 7.0(3)I6(1) and later on N9k |
| `ipv4_echo_rx_interval` | Not supported on N5k, N6k |
| `ipv4_interval` | Not supported on N5k, N6k |
@@ -1054,6 +1110,9 @@ Manages configuration of a BGP instance.
| N5k | 7.3(0)N1(1) | 1.2.0 |
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
+| N9k-f | 7.3(0)F3(2) | 1.8.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Caveats
@@ -1061,10 +1120,8 @@ Manages configuration of a BGP instance.
|:--------|:-------------|
| `disable_policy_batching_ipv4` | Not supported on N5k, N6k
Supported in OS Version 8.1.1 and later on N7k |
| `disable_policy_batching_ipv6` | Not supported on N5k, N6k
Supported in OS Version 8.1.1 and later on N7k |
-| `event_history_errors ` | supported on N3|9k on 7.0(3)I5(1) and later images |
-| `event_history_events ` | default value is 'large' for N3|9k on 7.0(3)I5(1) and later images |
-| `event_history_objstore ` | supported on N3|9k on 7.0(3)I5(1) and later images |
-| `event_history_periodic ` | default value is 'false' for N3|9k on 7.0(3)I5(1) and later images |
+| `event_history_errors ` | Supported in OS Version 8.0.1 and later on N7k
Supported in OS Version 7.0(3)I5(1) and later on N3|9k |
+| `event_history_objstore ` | Supported in OS Version 8.0.1 and later on N7k
Supported in OS Version 7.0(3)I5(1) and later on N3|9k |
| `neighbor_down_fib_accelerate` | Not supported on N5k, N6k
Supported in OS Version 8.1.1 and later on N7k |
| `reconnect_interval` | Not supported on N5k, N6k
Supported in OS Version 8.1.1 and later on N7k |
| `suppress_fib_pending` | Idempotence supported only on 7.0(3)I5(1) and later images N3|9k |
@@ -1125,22 +1182,22 @@ Enable/Disable the batching evaluation of prefix advertisements to all peers wit
Enable/Disable enforces the neighbor autonomous system to be the first AS number listed in the AS path attribute for eBGP. Valid values are 'true', 'false', and 'default'. On NX-OS, this property is only supported in the global BGP context.
##### `event_history_cli`
-Enable/Disable/specify size of cli event history buffer. Valid values are 'true', 'false', 'size_small', 'size_medium', 'size_large', 'size_disable' and 'default'. Size can also be specified in bytes.
+Enable/Disable/specify size of cli event history buffer. Valid values are false', 'size_small', 'size_medium', 'size_large', 'size_disable'. Size can also be specified in bytes. Please Note: Setting this value to 'default' or 'true' has been deprecated in module version 1.8.0. This property is only used for BGP debugging purposes and idempotency is not guaranteed.
##### `event_history_detail`
-Enable/Disable/specify size of detail event history buffer. Valid values are 'true', 'false', 'size_small', 'size_medium', 'size_large', 'size_disable' and 'default'. Size can also be specified in bytes.
+Enable/Disable/specify size of detail event history buffer. Valid values are 'false', 'size_small', 'size_medium', 'size_large', 'size_disable'. Size can also be specified in bytes. Please Note: Setting this value to 'default' or 'true' has been deprecated in module version 1.8.0. This property is only used for BGP debugging purposes and idempotency is not guaranteed.
##### `event_history_errors`
-Enable/Disable/specify size of error history buffer. Valid values are 'true', 'false', 'size_small', 'size_medium', 'size_large', 'size_disable' and 'default'. Size can also be specified in bytes.
+Enable/Disable/specify size of error history buffer. Valid values are 'false', 'size_small', 'size_medium', 'size_large', 'size_disable'. Size can also be specified in bytes. Please Note: Setting this value to 'default' or 'true' has been deprecated in module version 1.8.0. This property is only used for BGP debugging purposes and idempotency is not guaranteed.
##### `event_history_events`
-Enable/Disable/specify size of event history buffer. Valid values are 'true', 'false', 'size_small', 'size_medium', 'size_large', 'size_disable' and 'default'. Size can also be specified in bytes.
+Enable/Disable/specify size of event history buffer. Valid values are 'false', 'size_small', 'size_medium', 'size_large', 'size_disable'. Size can also be specified in bytes. Please Note: Setting this value to 'default' or 'true' has been deprecated in module version 1.8.0. This property is only used for BGP debugging purposes and idempotency is not guaranteed.
##### `event_history_objstore`
-Enable/Disable/specify size of objstore history buffer. Valid values are 'true', 'false', 'size_small', 'size_medium', 'size_large', 'size_disable' and 'default'. Size can also be specified in bytes.
+Enable/Disable/specify size of objstore history buffer. Valid values are 'false', 'size_small', 'size_medium', 'size_large', 'size_disable'. Size can also be specified in bytes. Please Note: Setting this value to 'default' or 'true' has been deprecated in module version 1.8.0. This property is only used for BGP debugging purposes and idempotency is not guaranteed.
##### `event_history_periodic`
-Enable/Disable/specify size of periodic event history buffer. Valid values are 'true', 'false', 'size_small', 'size_medium', 'size_large', 'size_disable' and 'default'. Size can also be specified in bytes.
+Enable/Disable/specify size of periodic event history buffer. Valid values are 'false', 'size_small', 'size_medium', 'size_large', 'size_disable'. Size can also be specified in bytes. Please Note: Setting this value to 'default' or 'true' has been deprecated in module version 1.8.0. This property is only used for BGP debugging purposes and idempotency is not guaranteed.
##### `fast_external_fallover`
Enable/Disable immediately reset the session if the link to a directly connected BGP peer goes down. Valid values are 'true', 'false', and 'default'. On NX-OS, this property is only supported in the global BGP context.
@@ -1223,12 +1280,13 @@ Manages configuration of a BGP Address-family instance.
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Caveats
| Property | Caveat Description |
|:--------|:-------------|
-| `additional_paths_install` | Not supported on N3k, N9k-F, N9k |
+| `additional_paths_install` | Not supported on N3k, N3k-F, N9k-F, N9k |
| `advertise_l2vpn_evpn` | Not supported on N3k, N6k |
| address-family `l2vpn/evpn` | Module Minimum Version 1.3.2
OS Minimum Version 7.0(3)I3(1)
Not supported on N3k |
@@ -1403,6 +1461,7 @@ Manages configuration of a BGP Address-family Aggregate-address instance.
| N6k | 7.3(0)N1(1) | 1.7.0 |
| N7k | 7.3(0)D1(1) | 1.7.0 |
| N9k-F | 7.0(3)F1(1) | 1.7.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Parameters
@@ -1455,6 +1514,7 @@ Manages configuration of a BGP Neighbor.
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Caveats
@@ -1557,6 +1617,7 @@ Manages configuration of a BGP Neighbor Address-family instance.
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Caveats
@@ -1683,6 +1744,7 @@ Manages a cisco Bridge-Domain
| N6k | not applicable | not applicable |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | not applicable | not applicable |
+| N3k-F | not applicable | not applicable |
#### Parameters
@@ -1693,13 +1755,13 @@ Determines whether or not the config should be present on the device. Valid valu
ID of the Bridge Domain. Valid values are integer.
##### `bd_name`
-The bridge-domain name. Valid values are String or keyword 'default'.
+The bridge-domain name. Valid values are String or keyword 'default'. When the bd_name is set to 'default', this property is NOT idempotent.
##### `shutdown`
Specifies the shutdown state of the bridge-domain. Valid values are true, false, 'default'.
##### `fabric_control`
-Specifies this bridge-domain as the fabric control bridge-domain. Only one bridge-domain or VLAN can be configured as fabric-control. Valid values are true, false.
+Specifies this bridge-domain as the fabric control bridge-domain. Only one bridge-domain or VLAN can be configured as fabric-control. Valid values are true, false, keyword 'default.
--
### Type: cisco_bridge_domain_vni
@@ -1713,6 +1775,7 @@ Creates a Virtual Network Identifier member (VNI) mapping for cisco Bridge-Domai
| N6k | not applicable | not applicable |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | not applicable | not applicable |
+| N3k-F | not applicable | not applicable |
#### Parameters
@@ -1738,6 +1801,7 @@ Manages configuration of a DHCP relay global configuration.
| N6k | 7.3(0)N1(1) | 1.4.0 |
| N7k | 7.3(0)D1(1) | 1.4.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Caveats
@@ -1745,8 +1809,8 @@ Manages configuration of a DHCP relay global configuration.
|:--------|:-------------|
| `ipv4_information_option_trust` | Not supported on N5k, N6k |
| `ipv4_information_trust_all` | Not supported on N5k, N6k |
-| `ipv4_src_addr_hsrp` | Not supported on N3k, N9k, N9k-F |
-| `ipv4_sub_option_circuit_id_custom` | Not supported on N7k, N9k-F(TBD) and supported on N3k and N9k running os version 7.0(3)I3.1 and later |
+| `ipv4_src_addr_hsrp` | Not supported on N3k, N3k-F, N9k, N9k-F |
+| `ipv4_sub_option_circuit_id_custom` | Not supported on N7k, N3k-F, N9k-F(TBD) and supported on N3k and N9k running os version 7.0(3)I3.1 and later |
| `ipv4_sub_option_circuit_id_string` | Supported on N3k
Supported in OS Version 7.0(3)I6(1) and later on N9k |
| `ipv6_option_cisco` | Not supported on N5k, N6k |
@@ -1809,6 +1873,7 @@ Manages a Global VNI Encapsulation profile
| N6k | not applicable | not applicable |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | not applicable | not applicable |
+| N3k-F | not applicable | not applicable |
#### Parameters
@@ -1836,6 +1901,7 @@ Manages Cisco Ethernet Virtual Private Network (EVPN) VXLAN Network Identifier (
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Caveats
@@ -1966,6 +2032,7 @@ Manages a Cisco fabricpath Topology
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | not applicable | not applicable |
+| N3k-F | not applicable | not applicable |
#### Parameters
@@ -1992,6 +2059,7 @@ Manages Cisco Hot Standby Router Protocol (HSRP) global parameters.
| N6k | 7.3(0)N1(1) | 1.5.0 |
| N7k | 7.3(0)D1(1) | 1.5.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Caveats
@@ -2021,26 +2089,27 @@ Manages a Cisco Network Interface. Any resource dependency should be run before
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Caveats
| Property | Caveat Description |
|:---------|:-------------|
| `ipv4_dhcp_relay_info_trust` | Not supported on N5k,N6k |
-| `ipv4_dhcp_relay_src_addr_hsrp` | Not supported on N3k,N9k-F,N9k |
+| `ipv4_dhcp_relay_src_addr_hsrp` | Not supported on N3k,N3k-F,N9k-F,N9k |
| `storm_control_broadcast` | Not supported on N7k |
| `storm_control_multicast` | Not supported on N7k |
-| `pvlan_mapping` | Not supported on N9k-F |
-| `switchport_pvlan_host` | Not supported on N9k-F |
-| `switchport_pvlan_host_association` | Not supported on N9k-F |
-| `switchport_pvlan_mapping` | Not supported on N9k-F |
-| `switchport_pvlan_mapping_trunk` | Not supported on N3k,N9k-F |
-| `switchport_pvlan_promiscuous` | Not supported on N9k-F |
-| `switchport_pvlan_trunk_allowed_vlan` | Not supported on N9k-F |
-| `switchport_pvlan_trunk_association` | Not supported on N3k,N9k-F |
-| `switchport_pvlan_trunk_native_vlan` | Not supported on N9k-F |
-| `switchport_pvlan_trunk_promiscuous` | Not supported on N3k,N9k-F |
-| `switchport_pvlan_trunk_secondary` | Not supported on N3k,N9k-F |
+| `pvlan_mapping` | Not supported on N3k-F,N9k-F |
+| `switchport_pvlan_host` | Not supported on N3k-F,N9k-F |
+| `switchport_pvlan_host_association` | Not supported on N3k-F,N9k-F |
+| `switchport_pvlan_mapping` | Not supported on N3k-F,N9k-F |
+| `switchport_pvlan_mapping_trunk` | Not supported on N3k,N3k-F,N9k-F |
+| `switchport_pvlan_promiscuous` | Not supported on N3k-F,N9k-F |
+| `switchport_pvlan_trunk_allowed_vlan` | Not supported on N3k-F,N9k-F |
+| `switchport_pvlan_trunk_association` | Not supported on N3k,N3k-F,N9k-F |
+| `switchport_pvlan_trunk_native_vlan` | Not supported on N3k-F,N9k-F |
+| `switchport_pvlan_trunk_promiscuous` | Not supported on N3k,N3k-F,N9k-F |
+| `switchport_pvlan_trunk_secondary` | Not supported on N3k,N3k-F,N9k-F |
| `svi_autostate` | Only supported on N3k,N7k,N9k |
| `vlan_mapping` | Only supported on N7k |
| `vlan_mapping_enable` | Only supported on N7k |
@@ -2055,6 +2124,7 @@ Manages a Cisco Network Interface. Any resource dependency should be run before
| `load_interval_counter_2_delay` | Minimum puppet module version 1.6.0 |
| `load_interval_counter_3_delay` | Minimum puppet module version 1.6.0 |
| `purge_config` | Minimum puppet module version 1.7.0 |
+| Ensure absent for ethernet interfaces | Minimum puppet module version 1.8.0 |
#### Parameters
@@ -2064,6 +2134,13 @@ Manages a Cisco Network Interface. Any resource dependency should be run before
Determine whether the interface config should be present or not. Valid values
are 'present' and 'absent'.
+Version `1.8.0` of the module allows physical ethernet interfaces to be managed as ensurable resources.
+
+Notes about `ensure => present` and `ensure => absent` on physical ethernet interfaces:
+* `ensure => present` along with non-default property values will put the interface into a non-default state.
+* `ensure => absent` will put the interface into a default state.
+* Physical interfaces will be displayed as `ensure => absent` by the `puppet resource` command when they are in a default state.
+
###### `interface`
Name of the interface on the network element. Valid value is a string.
@@ -2394,6 +2471,7 @@ Manages a Cisco Network Interface Channel-group.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Caveats
@@ -2438,6 +2516,7 @@ Manages a Cisco Network Interface HSRP group.
| N6k | not applicable | not applicable |
| N7k | 8.0 | 1.5.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Caveats
@@ -2534,6 +2613,7 @@ Manages a Cisco Network Interface Service VNI.
| N6k | not applicable | not applicable |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | not applicable | not applicable |
+| N3k-F | not applicable | not applicable |
#### Parameters
@@ -2568,6 +2648,7 @@ Manages configuration of an OSPF interface instance.
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Parameters
@@ -2701,6 +2782,7 @@ Manages configuration of ITD (Intelligent Traffic Director) device group
| N6k | not applicable | not applicable |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | not applicable | not applicable |
+| N3k-F | not applicable | not applicable |
#### Parameters
@@ -2744,6 +2826,7 @@ Manages configuration of ITD (Intelligent Traffic Director) device group node
| N6k | not applicable | not applicable |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | not applicable | not applicable |
+| N3k-F | not applicable | not applicable |
#### Parameters
@@ -2865,6 +2948,127 @@ keyword 'default'.
##### `virtual_ip`
Virtual ip configuration. Valid values are an array of Strings or 'default'.
+--
+### Type: cisco_object_group
+
+Manages configuration of an ObjectGroup instance. This has no properties and it is the parent of ObjectGroupEntry.
+
+| Platform | OS Minimum Version | Module Minimum Version |
+|----------|:------------------:|:----------------------:|
+| N9k | 7.0(3)I2(2e) | 1.8.0 |
+| N3k | 7.0(3)I2(2e) | 1.8.0 |
+| N5k | not applicable | not applicable |
+| N6k | not applicable | not applicable |
+| N7k | 7.3(0)D1(1) | 1.8.0 |
+| N9k-F | 7.0(3)F1(1) | 1.8.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
+#### Parameters
+
+| Example Parameter Usage
+|:--
+| `cisco_object_group { ' ':`
+| `cisco_object_group { 'ipv4 address myog_v4_addr':`
+
+##### `afi`
+Address Family Identifier (AFI). Required. Valid values are 'ipv4' and 'ipv6'.
+
+##### `type`
+Type of the object_group instance. Required. Valid values are 'address' and 'port'.
+
+##### `grp_name`
+Name of the object_group instance. Required. Valid values are type String.
+
+##### Properties
+
+##### `ensure`
+Determines whether the config should be present or not on the device. Valid values are 'present' and 'absent'.
+
+--
+### Type: cisco_object_group_entry
+
+Manages configuration of an ObjectGroupEntry instance.
+
+| Platform | OS Minimum Version | Module Minimum Version |
+|----------|:------------------:|:----------------------:|
+| N9k | 7.0(3)I2(2e) | 1.8.0 |
+| N3k | 7.0(3)I2(2e) | 1.8.0 |
+| N5k | not applicable | not applicable |
+| N6k | not applicable | not applicable |
+| N7k | 7.3(0)D1(1) | 1.8.0 |
+| N9k-F | 7.0(3)F1(1) | 1.8.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
+#### Example Usage
+
+```puppet
+cisco_object_group_entry { 'ipv4 address myoge_v4_addr 10':
+ ensure => 'present',
+ address => '10.10.10.1/24',
+}
+
+cisco_object_group_entry { 'ipv4 port myoge_v4_port 20':
+ ensure => 'present',
+ port => 'neq 40',
+}
+
+cisco_object_group_entry { 'ipv6 address myoge_v6_addr 30':
+ ensure => 'present',
+ address => '2000::1/64',
+}
+```
+
+#### Parameters
+
+| Example Parameter Usage
+|:--
+| `cisco_object_group_entry { ' ':`
+| `cisco_object_group_entry { 'ipv4 address myoge_v4_addr 10':`
+
+##### `afi`
+Address Family Identifier (AFI). Required. Valid values are 'ipv4' and 'ipv6'.
+
+##### `type`
+Type of the object_group instance. Required. Valid values are 'address' and 'port'.
+
+##### `grp_name`
+Name of the object_group instance. Required. Valid values are type String.
+
+##### `seqno`
+Object Group Entry Sequence Number. Required. Valid values are type Integer.
+
+##### `ensure`
+Determines whether the config should be present or not on the device. Valid values are 'present' and 'absent'.
+
+#### Properties
+
+##### `address`
+The Address to match against. Valid values are type String, which must be one of the following forms:
+
+* An IPv4/IPv6 address/prefix length
+* The keyword `host` and a host address
+* An IPv4 Address and wildcard
+
+| Examples
+|:--
+| `address => '10.10.10.1/24'`
+| `address => '10.10.10.1 11.12.13.14'`
+| `address => 'host 10.0.0.1'`
+| `address => '2000::1/64'`
+| `address => 'host 2001::1'`
+
+##### `port`
+The TCP or UDP Port to match against. Valid values are type String, which must be one of the following forms:
+
+* A comparison operator (`eq`, `neq`, `lt`, `gt`) and value
+* The keyword `range` and a range value
+
+| Examples
+|:--
+| `port => 'neq 40'`
+| `port => 'range 68 69'`
+| `port => 'lt 400'`
+
--
### Type: cisco_ospf
@@ -2878,6 +3082,7 @@ Manages configuration of an ospf instance.
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Parameters
@@ -2901,6 +3106,7 @@ Manages an area for an OSPF router.
| N6k | 7.3(0)N1(1) | 1.4.0 |
| N7k | 7.3(0)D1(1) | 1.4.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Example Usage
@@ -3009,6 +3215,7 @@ Manages an area virtual link for an OSPF router.
| N6k | 7.3(0)N1(1) | 1.4.0 |
| N7k | 7.3(0)D1(1) | 1.4.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Example Usage
@@ -3090,6 +3297,7 @@ Manages a VRF for an OSPF router.
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Parameters
@@ -3159,6 +3367,7 @@ Also configures anycast gateway MAC of the switch.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Caveats
@@ -3202,6 +3411,7 @@ Manages configuration of an Protocol Independent Multicast (PIM) instance.
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Caveats
@@ -3237,6 +3447,7 @@ Manages configuration of an Protocol Independent Multicast (PIM) static route pr
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Parameters
@@ -3264,6 +3475,7 @@ Manages configuration of an Protocol Independent Multicast (PIM) static route pr
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
#### Parameters
@@ -3288,6 +3500,8 @@ Manages configuration of a portchannel global parameters
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Caveats
@@ -3300,7 +3514,7 @@ Manages configuration of a portchannel global parameters
| `concatenation` | Supported only on N9k |
| `hash_poly` | Supported only on N5k, N6k |
| `resilient`
`symmetry` | Supported only on N3k, N9k |
-| `rotate` | Supported only on N7k, N9k-F, N9k |
+| `rotate` | Supported only on N3k-F, N7k, N9k-F, N9k |
#### Parameters
@@ -3347,46 +3561,48 @@ Manages a Cisco Route Map.
| N6k | 7.3(0)N1(1) | 1.6.0 |
| N7k | 7.3(0)D1(1) | 1.6.0 |
| N9k-F | 7.0(3)F1(1) | 1.6.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Caveats
| Property | Caveat Description |
|:---------|:-------------|
-| `match_evpn_route_type_1` | Not supported on N3k,N9k-F,N9k |
-| `match_evpn_route_type_2_all` | Not supported on N3k,N9k-F,N9k |
-| `match_evpn_route_type_2_mac_ip` | Not supported on N3k,N9k-F,N9k |
-| `match_evpn_route_type_2_mac_only` | Not supported on N3k,N9k-F,N9k |
-| `match_evpn_route_type_3` | Not supported on N3k,N9k-F,N9k |
-| `match_evpn_route_type_4` | Not supported on N3k,N9k-F,N9k |
-| `match_evpn_route_type_5` | Not supported on N3k,N9k-F,N9k |
-| `match_evpn_route_type_6` | Not supported on N3k,N9k-F,N9k |
-| `match_evpn_route_type_all` | Not supported on N3k,N9k-F,N9k |
-| `match_length` | Not supported on N3k,N9k-F,N9k |
-| `match_mac_list` | Not supported on N3k,N9k-F,N9k |
+| `match_evpn_route_type_1` | Not supported on N3k,N3k-F,N9k-F,N9k |
+| `match_evpn_route_type_2_all` | Not supported on N3k,N3k-F,N9k-F,N9k |
+| `match_evpn_route_type_2_mac_ip` | Not supported on N3k,N3k-F,N9k-F,N9k |
+| `match_evpn_route_type_2_mac_only` | Not supported on N3k,N3k-F,N9k-F,N9k |
+| `match_evpn_route_type_3` | Not supported on N3k,N3k-F,N9k-F,N9k |
+| `match_evpn_route_type_4` | Not supported on N3k,N3k-F,N9k-F,N9k |
+| `match_evpn_route_type_5` | Not supported on N3k,N3k-F,N9k-F,N9k |
+| `match_evpn_route_type_6` | Not supported on N3k,N3k-F,N9k-F,N9k |
+| `match_evpn_route_type_all` | Not supported on N3k,N3k-F,N9k-F,N9k |
+| `match_length` | Not supported on N3k,N3k-F,N9k-F,N9k |
+| `match_mac_list` | Not supported on N3k,N3k-F,N9k-F,N9k |
| `match_metric` | Supported in OS Version 7.0(3)F2(1) and later on N9k-F |
-| `match_ospf_area` | Not supported on N5k,N6k,N7k,N9k-F
Supported in OS version 7.0(3)I5.1 and later on N3k, N9k |
-| `match_vlan` | Not supported on N3k,N9k-F,N9k |
+| `match_ospf_area` | Not supported on N5k,N6k,N7k,N3k-F,N9k-F
Supported in OS version 7.0(3)I5.1 and later on N3k, N9k |
+| `match_vlan` | Not supported on N3k,N3k-F,N9k-F,N9k |
| `set_extcommunity_4bytes_additive` | Supported in OS Version 7.0(3)F2(1) and later on N9k-F |
| `set_extcommunity_4bytes_non_transitive` | Supported in OS Version 7.0(3)F2(1) and later on N9k-F |
| `set_extcommunity_4bytes_transitive` | Supported in OS Version 7.0(3)F2(1) and later on N9k-F |
-| `set_extcommunity_cost_igp` | Not supported on N9k-F |
-| `set_extcommunity_cost_pre_bestpath` | Not supported on N9k-F |
-| `set_extcommunity_rt_additive` | Not supported on N9k-F |
-| `set_extcommunity_rt_asn` | Not supported on N9k-F,N9k |
-| `set_forwarding_addr` | Not supported on N9k-F |
-| `set_ipv4_default_next_hop` | Not supported on N5k,N6k,N9k-F,N9k |
-| `set_ipv4_default_next_hop_load_share` | Not supported on N5k,N6k,N9k-F,N9k |
-| `set_ipv4_next_hop` | Not supported on N9k-F |
+| `set_extcommunity_cost_igp` | Not supported on N3k-F,N9k-F |
+| `set_extcommunity_cost_pre_bestpath` | Not supported on N3k-F,N9k-F |
+| `set_extcommunity_rt_additive` | Not supported on N3k-F,N9k-F |
+| `set_extcommunity_rt_asn` | Not supported on N3k-F,N9k-F,N9k |
+| `set_forwarding_addr` | Not supported on N3k-F,N9k-F |
+| `set_ipv4_default_next_hop` | Not supported on N5k,N6k,N3k-F,N9k-F,N9k |
+| `set_ipv4_default_next_hop_load_share` | Not supported on N5k,N6k,N3k-F,N9k-F,N9k |
+| `set_ipv4_next_hop` | Not supported on N3k-F,N9k-F |
| `set_ipv4_next_hop_load_share` | Not supported on N5k,N6k
Supported in OS Version 7.0(3)I5.1 and later on N9k
Supported in OS Version 7.0(3)F2(1) and later on N9k-F |
-| `set_ipv4_next_hop_redist` | Supported on N5k,N6k,N7k,N9k-F
Supported in OS Version 7.0(3)I5.1 and later on N3k,N9k |
-| `set_ipv4_precedence` | Not supported on N9k-F |
-| `set_ipv4_prefix` | Not supported on N5k,N6k,N9k-F |
-| `set_ipv6_default_next_hop` | Not supported on N5k,N6k,N9k-F,N9k |
-| `set_ipv6_default_next_hop_load_share` | Not supported on N5k,N6k,N9k-F,N9k |
-| `set_ipv6_next_hop` | Not supported on N9k-F |
+| `set_ipv4_next_hop_redist` | Supported on N5k,N6k,N7k,N3k-F,N9k-F
Supported in OS Version 7.0(3)I5.1 and later on N3k,N9k |
+| `set_ipv4_precedence` | Not supported on N3k-F,N9k-F |
+| `set_ipv4_prefix` | Not supported on N5k,N6k,N3k-F,N9k-F |
+| `set_ipv6_default_next_hop` | Not supported on N5k,N6k,N3k-F,N9k-F,N9k |
+| `set_ipv6_default_next_hop_load_share` | Not supported on N5k,N6k,N3k-F,N9k-F,N9k |
+| `set_ipv6_next_hop` | Not supported on N3k-F,N9k-F |
| `set_ipv6_next_hop_load_share` | Not supported on N5k,N6k
Supported in OS Version 7.0(3)I5.1 and later on N9k
Supported in OS Version 7.0(3)F2(1) and later on N9k-F |
-| `set_ipv6_next_hop_redist` | Supported on N5k,N6k,N7k,N9k-F
Supported in OS Version 7.0(3)I5.1 and later on N3k,N9k |
-| `set_ipv6_prefix` | Not supported on N5k,N6k,N9k-F |
+| `set_ipv6_next_hop_redist` | Supported on N5k,N6k,N7k,N3k-F,N9k-F
Supported in OS Version 7.0(3)I5.1 and later on N3k,N9k |
+| `set_ipv6_prefix` | Not supported on N5k,N6k,N3k-F,N9k-F |
| `set_vrf` | Supported on N7k |
@@ -3883,6 +4099,8 @@ Manages an SNMP community on a Cisco SNMP server.
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -3917,6 +4135,8 @@ of group; thus this provider utility does not create snmp groups and only report
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -3940,6 +4160,8 @@ cisco_snmp_server.
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -3985,6 +4207,8 @@ Manages an SNMP user on an cisco SNMP server.
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -4034,6 +4258,8 @@ instance of the cisco_tacacs_server.
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -4077,6 +4303,8 @@ Configures Cisco TACACS+ server hosts.
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -4114,10 +4342,12 @@ Manages the upgrade of a Cisco device.
| N6k | not applicable | not applicable |
| N7k | not applicable | not applicable |
| N9k-F | 7.0(3)F1(1) | 1.6.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Caveats
-The `cisco_upgrade` is only supported on *simplex* N3k, N9k and N9k-F devices. HA devices are currently not supported.
+The `cisco_upgrade` is only supported on *simplex* N3k, N3k-F, N9k and N9k-F devices. HA devices are currently not supported.
| Property | Caveat Description |
|:--------|:-------------|
@@ -4156,6 +4386,8 @@ Manages a Cisco VDC (Virtual Device Context).
| N6k | not applicable | not applicable |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | not applicable | not applicable |
+| N3k-F | not applicable | not applicable |
+
#### Parameters
@@ -4190,8 +4422,8 @@ Manages a Cisco VLAN.
|:--------|:-------------|
| `fabric_control` | Only supported on N7k (support added in ciscopuppet 1.3.0) |
| `mode` | Only supported on N5k,N6k,N7k |
-| `pvlan_type` | Not supported on N9k-F |
-| `pvlan_association` | Not supported on N9k-F |
+| `pvlan_type` | Not supported on N3k-F,N9k-F |
+| `pvlan_association` | Not supported on N3k-F,N9k-F |
#### Parameters
@@ -4247,6 +4479,8 @@ Manages the virtual Port Channel (vPC) domain configuration of a Cisco device.
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Caveats
@@ -4359,6 +4593,8 @@ device.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Caveats
@@ -4429,6 +4665,8 @@ Manages Cisco Virtual Routing and Forwarding (VRF) Address-Family configuration.
| N6k | 7.3(0)N1(1) | 1.2.0 |
| N7k | 7.3(0)D1(1) | 1.2.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Caveats
@@ -4512,6 +4750,8 @@ There can only be one instance of the cisco_vtp.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -4546,6 +4786,8 @@ Creates a VXLAN Network Virtualization Endpoint (NVE) overlay interface that ter
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Caveats
@@ -4585,14 +4827,16 @@ Creates a Virtual Network Identifier member (VNI) for an NVE overlay interface.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Caveats
| Property | Caveat Description |
|---------------------------------|--------------------------------------|
-| ingress_replication | Not supported on N3k, N5k, N6k
Supported in OS Version 8.1.1 and later on N7k |
-| peer_list | Not supported on N3k, N5k, N6k
Supported in OS Version 8.1.1 and later on N7k |
-| suppress_uuc | Not supported on N3k, N9k, N9k-F
Supported in OS Version 8.1.1 and later on N7k |
+| ingress_replication | Not supported on N3k, N5k, N6k, N7k |
+| peer_list | Not supported on N3k, N5k, N6k, N7k |
+| suppress_uuc | Not supported on N3k, N3k-F, N9k, N9k-F
Supported in OS Version 8.1.1 and later on N7k |
#### Parameters
@@ -4642,6 +4886,8 @@ Configure the domain name of the device
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -4662,6 +4908,8 @@ Domain name of the device. Valid value is a string.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -4682,6 +4930,8 @@ Hostname or address of the DNS server. Valid value is a string.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -4713,6 +4963,8 @@ Manages a puppet netdev_stdlib Network Interface. Any resource dependency should
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -4745,6 +4997,8 @@ interface. Valid value is an integer.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -4773,6 +5027,8 @@ Manages a puppet netdev_stdlib Network Trunk. It should be noted that while the
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -4809,6 +5065,8 @@ Manages a puppet netdev_stdlib Network Vlan.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -4835,6 +5093,8 @@ The name of the VLAN. Valid value is a string.
| N6k | 7.3(0)N1(1) | 1.7.0 |
| N7k | 7.3(0)D1(1) | 1.7.0 |
| N9k-F | 7.0(3)F1(1) | 1.7.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -4861,6 +5121,8 @@ Authentication password. Valid value is a string.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Caveats
@@ -4894,6 +5156,8 @@ Trusted key for the NTP server. Valid value is integer.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Caveats
@@ -4935,6 +5199,8 @@ Name of the vrf. Valid value is a string.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -4964,6 +5230,8 @@ Name of the port channel. eg port-channel100. Valid value is a string.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -4984,6 +5252,8 @@ Enable or disable radius functionality. Valid values are 'true' or 'false'.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -5061,6 +5331,8 @@ Encryption key format [0-7]. Valid value is an integer.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -5080,6 +5352,8 @@ Configure the search domain of the device. Note that this type is functionally e
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -5102,6 +5376,8 @@ Manages an SNMP community on a Cisco SNMP server.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -5130,6 +5406,8 @@ Manages an SNMP notification on a Cisco SNMP server.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -5150,6 +5428,8 @@ Manages an SNMP notification receiver on an cisco SNMP server.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -5194,6 +5474,8 @@ Manages an SNMP user on an cisco SNMP server.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -5238,6 +5520,8 @@ format (in case of true) or cleartext (in case of false). Valid values are 'true
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -5264,6 +5548,8 @@ Interface to send syslog data from, e.g. "management". Valid value is a string.
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -5284,6 +5570,8 @@ The unit of measurement for log time values. Valid values are 'seconds' and 'mi
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -5301,6 +5589,8 @@ Enable or disable radius functionality [true|false]
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -5314,7 +5604,7 @@ Encryption key (plaintext or in hash form depending on key_format)
Encryption key format [0-7]
##### `timeout`
-Number of seconds before the timeout period ends
+Number of seconds before the timeout period ends. Also supports [undef](https://puppet.com/docs/puppet/5.3/lang_data_undef.html)
--
### Type: tacacs_server
@@ -5327,6 +5617,8 @@ Number of seconds before the timeout period ends
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
##### `ensure`
Determines whether or not the config should be present on the device. Valid values are 'present' and 'absent'.
@@ -5357,6 +5649,8 @@ Number of seconds before the timeout period ends
| N6k | 7.3(0)N1(1) | 1.3.0 |
| N7k | 7.3(0)D1(1) | 1.3.0 |
| N9k-F | 7.0(3)F1(1) | 1.5.0 |
+| N3k-F | 7.0(3)F3(2) | 1.8.0 |
+
#### Parameters
@@ -5409,7 +5703,7 @@ Yum |
diff --git a/examples/cisco/demo_acl.pp b/examples/cisco/demo_acl.pp
index 3ee69a59d..0783f3992 100644
--- a/examples/cisco/demo_acl.pp
+++ b/examples/cisco/demo_acl.pp
@@ -17,7 +17,7 @@
class ciscopuppet::cisco::demo_acl {
$fragments = platform_get() ? {
- /(n3k|n7k|n9k-f|n9k)/ => 'permit',
+ /(n3k|n7k|n3k-f|n9k-f|n9k)/ => 'permit',
default => undef
}
@@ -38,32 +38,32 @@
}
$http_method = platform_get() ? {
- /(n3k|n9k-f|n9k)/ => 'post',
+ /(n3k|n3k-f|n9k-f|n9k)/ => 'post',
default => undef
}
$packet_length = platform_get() ? {
- /(n3k|n7k|n9k-f|n9k)/ => 'range 80 1000',
+ /(n3k|n7k|n3k-f|n9k-f|n9k)/ => 'range 80 1000',
default => undef
}
$redirect = platform_get() ? {
- /(n3k|n9k-f|n9k)/ => 'Ethernet1/1,Ethernet1/2,port-channel1',
+ /(n3k|n3k-f|n9k-f|n9k)/ => 'Ethernet1/1,Ethernet1/2,port-channel1',
default => undef
}
$tcp_option_length = platform_get() ? {
- /(n3k|n9k-f|n9k)/ => '20',
+ /(n3k|n3k-f|n9k-f|n9k)/ => '20',
default => undef
}
$time_range = platform_get() ? {
- /(n3k|n7k|n9k-f|n9k)/ => 'my_range',
+ /(n3k|n7k|n3k-f|n9k-f|n9k)/ => 'my_range',
default => undef
}
$ttl = platform_get() ? {
- /(n3k|n9k-f|n9k)/ => '153',
+ /(n3k|n3k-f|n9k-f|n9k)/ => '153',
default => undef
}
diff --git a/examples/cisco/demo_bfd.pp b/examples/cisco/demo_bfd.pp
index bcbdcd1e2..851c39fec 100644
--- a/examples/cisco/demo_bfd.pp
+++ b/examples/cisco/demo_bfd.pp
@@ -17,7 +17,7 @@
class ciscopuppet::cisco::demo_bfd {
$echo_rx_interval = platform_get() ? {
- /(n3k|n7k|n9k-f|n9k)/ => 300,
+ /(n3k|n7k|n3k-f|n9k-f|n9k)/ => 300,
default => undef
}
@@ -43,37 +43,37 @@
}
$ipv4_echo_rx_interval = platform_get() ? {
- /(n3k|n7k|n9k-f|n9k)/ => 100,
+ /(n3k|n7k|n3k-f|n9k-f|n9k)/ => 100,
default => undef
}
$ipv4_interval = platform_get() ? {
- /(n3k|n7k|n9k-f|n9k)/ => ['200', '200', '50'],
+ /(n3k|n7k|n3k-f|n9k-f|n9k)/ => ['200', '200', '50'],
default => undef
}
$ipv4_slow_timer = platform_get() ? {
- /(n3k|n7k|n9k-f|n9k)/ => 10000,
+ /(n3k|n7k|n3k-f|n9k-f|n9k)/ => 10000,
default => undef
}
$ipv6_echo_rx_interval = platform_get() ? {
- /(n3k|n7k|n9k-f|n9k)/ => 200,
+ /(n3k|n7k|n3k-f|n9k-f|n9k)/ => 200,
default => undef
}
$ipv6_interval = platform_get() ? {
- /(n3k|n7k|n9k-f|n9k)/ => ['500', '500', '30'],
+ /(n3k|n7k|n3k-f|n9k-f|n9k)/ => ['500', '500', '30'],
default => undef
}
$ipv6_slow_timer = platform_get() ? {
- /(n3k|n7k|n9k-f|n9k)/ => 25000,
+ /(n3k|n7k|n3k-f|n9k-f|n9k)/ => 25000,
default => undef
}
$startup_timer = platform_get() ? {
- /(n3k|n9k-f|n9k)/ => 25,
+ /(n3k|n3k-f|n9k-f|n9k)/ => 25,
default => undef
}
diff --git a/examples/cisco/demo_bgp.pp b/examples/cisco/demo_bgp.pp
index 082583a05..319c7d007 100644
--- a/examples/cisco/demo_bgp.pp
+++ b/examples/cisco/demo_bgp.pp
@@ -59,7 +59,7 @@
}
$event_history_errors = platform_get() ? {
- /(n3k|n9k$)/ => $facts['cisco']['images']['system_image'] ? {
+ /(n3k$|n9k$)/ => $facts['cisco']['images']['system_image'] ? {
/(I2|I3|I4)/ => undef,
default => 'size_small'
},
@@ -67,7 +67,7 @@
}
$event_history_objstore = platform_get() ? {
- /(n3k|n9k$)/ => $facts['cisco']['images']['system_image'] ? {
+ /(n3k$|n9k$)/ => $facts['cisco']['images']['system_image'] ? {
/(I2|I3|I4)/ => undef,
default => 'size_small'
},
diff --git a/examples/cisco/demo_dhcp_relay_global.pp b/examples/cisco/demo_dhcp_relay_global.pp
index 3e26e6e4a..aa44e4b30 100644
--- a/examples/cisco/demo_dhcp_relay_global.pp
+++ b/examples/cisco/demo_dhcp_relay_global.pp
@@ -17,12 +17,12 @@
class ciscopuppet::cisco::demo_dhcp_relay_global {
$ipv4_information_option_trust = platform_get() ? {
- /(n3k|n7k|n9k-f|n9k)/ => true,
+ /(n3k|n7k|n3k-f|n9k-f|n9k)/ => true,
default => undef
}
$ipv4_information_trust_all = platform_get() ? {
- /(n3k|n7k|n9k-f|n9k)/ => true,
+ /(n3k|n7k|n3k-f|n9k-f|n9k)/ => true,
default => undef
}
@@ -42,7 +42,7 @@
}
$ipv6_option_cisco = platform_get() ? {
- /(n3k|n7k|n9k-f|n9k)/ => true,
+ /(n3k|n7k|n3k-f|n9k-f|n9k)/ => true,
default => undef
}
diff --git a/examples/cisco/demo_interface.pp b/examples/cisco/demo_interface.pp
index 0c86bda90..33f995611 100755
--- a/examples/cisco/demo_interface.pp
+++ b/examples/cisco/demo_interface.pp
@@ -37,7 +37,7 @@
}
$ipv4_dhcp_relay_info_trust = platform_get() ? {
- /(n3k|n7k|n9k-f|n9k)/ => true,
+ /(n3k|n7k|n3k-f|n9k-f|n9k)/ => true,
default => undef
}
@@ -100,12 +100,12 @@
ipv6_dhcp_relay_src_intf => 'ethernet 2/2',
}
$storm_control_broadcast = platform_get() ? {
- /(n3k|n5k|n6k|n9k-f|n9k)/ => '77.77',
+ /(n3k|n5k|n6k|n3k-f|n9k-f|n9k)/ => '77.77',
default => undef
}
$storm_control_multicast = platform_get() ? {
- /(n3k|n5k|n6k|n9k-f|n9k)/ => '22.22',
+ /(n3k|n5k|n6k|n3k-f|n9k-f|n9k)/ => '22.22',
default => undef
}
diff --git a/examples/cisco/demo_object_group.pp b/examples/cisco/demo_object_group.pp
new file mode 100644
index 000000000..49244671a
--- /dev/null
+++ b/examples/cisco/demo_object_group.pp
@@ -0,0 +1,65 @@
+# Manifest to demo cisco_acl providers
+#
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+class ciscopuppet::cisco::demo_object_group {
+
+ cisco_object_group { 'ipv4 address my_addr1':
+ ensure => 'present',
+ }
+
+ cisco_object_group_entry { 'ipv4 address my_addr1 10':
+ ensure => 'present',
+ address => '1.2.3.4 2.3.4.5',
+ }
+
+ cisco_object_group_entry { 'ipv4 address my_addr1 20':
+ ensure => 'present',
+ address => '3.3.3.3/24',
+ }
+
+ cisco_object_group_entry { 'ipv4 address my_addr1 30':
+ ensure => 'present',
+ address => 'host 4.4.4.4',
+ }
+
+ cisco_object_group { 'ipv6 address my_addr2':
+ ensure => 'present'
+ }
+
+ cisco_object_group_entry { 'ipv6 address my_addr2 20':
+ ensure => 'present',
+ address => '2000::1/64',
+ }
+
+ cisco_object_group_entry { 'ipv6 address my_addr2 30':
+ ensure => 'present',
+ address => 'host 2001::10',
+ }
+
+ cisco_object_group { 'ipv4 port my_port':
+ ensure => 'present'
+ }
+
+ cisco_object_group_entry { 'ipv4 port my_port 20':
+ ensure => 'present',
+ port => 'range 100 200',
+ }
+
+ cisco_object_group_entry { 'ipv4 port my_port 30':
+ ensure => 'present',
+ port => 'neq 154',
+ }
+}
diff --git a/examples/cisco/demo_portchannel.pp b/examples/cisco/demo_portchannel.pp
index 3b65bc927..9be0ebe7a 100644
--- a/examples/cisco/demo_portchannel.pp
+++ b/examples/cisco/demo_portchannel.pp
@@ -42,12 +42,12 @@
}
$port_hash_distribution = platform_get() ? {
- /(n3k|n7k|n9k-f|n9k)/ => 'adaptive',
+ /(n3k|n7k|n3k-f|n9k-f|n9k)/ => 'adaptive',
default => undef
}
$port_load_defer = platform_get() ? {
- /(n3k|n7k|n9k-f|n9k)/ => true,
+ /(n3k|n7k|n3k-f|n9k-f|n9k)/ => true,
default => undef
}
@@ -57,7 +57,7 @@
}
$rotate = platform_get() ? {
- /(n7k|n9k-f|n9k)/ => '4',
+ /(n7k|n3k-f|n9k-f|n9k)/ => '4',
default => undef
}
diff --git a/examples/cisco/demo_route_map.pp b/examples/cisco/demo_route_map.pp
index bb2773761..59ff3973c 100644
--- a/examples/cisco/demo_route_map.pp
+++ b/examples/cisco/demo_route_map.pp
@@ -72,7 +72,7 @@
}
$match_ospf_area = platform_get() ? {
- /(n3k|n9k$)/ => $facts['cisco']['images']['system_image'] ? {
+ /(n3k$|n9k$)/ => $facts['cisco']['images']['system_image'] ? {
/(I2|I3|I4)/ => undef,
default => ['10', '7', '222']
},
@@ -95,7 +95,7 @@
}
$set_ipv4_next_hop_load_share = platform_get() ? {
- /(n3k|n9k$)/ => $facts['cisco']['images']['system_image'] ? {
+ /(n3k$|n9k$)/ => $facts['cisco']['images']['system_image'] ? {
/(I2|I3|I4)/ => undef,
default => true
},
@@ -119,7 +119,7 @@
}
$set_ipv4_next_hop_redist = platform_get() ? {
- /(n3k|n9k$)/ => $facts['cisco']['images']['system_image'] ? {
+ /(n3k$|n9k$)/ => $facts['cisco']['images']['system_image'] ? {
/(I2|I3|I4)/ => undef,
default => true
},
@@ -127,7 +127,7 @@
}
$set_ipv6_next_hop_redist = platform_get() ? {
- /(n3k|n9k$)/ => $facts['cisco']['images']['system_image'] ? {
+ /(n3k$|n9k$)/ => $facts['cisco']['images']['system_image'] ? {
/(I2|I3|I4)/ => undef,
default => true
},
@@ -135,7 +135,7 @@
}
$set_ipv6_next_hop_load_share = platform_get() ? {
- /(n3k|n9k$)/ => $facts['cisco']['images']['system_image'] ? {
+ /(n3k$|n9k$)/ => $facts['cisco']['images']['system_image'] ? {
/(I2|I3|I4)/ => undef,
default => true
},
@@ -261,7 +261,7 @@
}
}
- if platform_get() =~ /n9k-f/ {
+ if platform_get() =~ /n(3|9)k-f/ {
cisco_route_map {'MyRouteMap1 123 permit':
ensure => 'present',
description => 'Testing',
diff --git a/examples/cisco/demo_upgrade.pp b/examples/cisco/demo_upgrade.pp
index 960c4881d..74ede861a 100644
--- a/examples/cisco/demo_upgrade.pp
+++ b/examples/cisco/demo_upgrade.pp
@@ -19,13 +19,13 @@
# To use this manifest, make sure the gem and bin file are in the files directory under your
# puppet module on the puppet master.
- # agent-lab9-pm:files:2009> cd /etc/puppetlabs/code/environments/production/modules/ciscopuppet/files/
- # agent-lab9-pm:files:2010> ls -lh
+ # puppetmaster:files:2009> cd /etc/puppetlabs/code/environments/production/modules/ciscopuppet/files/
+ # puppetmaster:files:2010> ls -lh
# total 1.3G
- # -rw-r--r-- 1 root root 431K Mar 2 14:19 cisco_node_utils-1.5.0.gem
+ # -rw-r--r-- 1 root root 431K Mar 2 14:19 cisco_node_utils-1.6.0.gem
# -rwxr-xr-- 1 root root 530M Mar 2 15:46 nxos.7.0.3.I2.5.bin
# -rwxr-xr-- 1 root root 723M Mar 2 15:25 nxos.7.0.3.I5.1.bin
- # agent-lab9-pm:files:2011>
+ # puppetmaster:files:2011>
node default {
$gem = 'cisco_node_utils-1.6.0.gem'
diff --git a/examples/demo_all_cisco.pp b/examples/demo_all_cisco.pp
index 7948b6304..5d733aea1 100644
--- a/examples/demo_all_cisco.pp
+++ b/examples/demo_all_cisco.pp
@@ -38,6 +38,7 @@
include ciscopuppet::cisco::demo_interface
#include ciscopuppet::cisco::demo_interface_service_vni
include ciscopuppet::cisco::demo_itd
+ include ciscopuppet::cisco::demo_object_group
include ciscopuppet::cisco::demo_ospf
include ciscopuppet::cisco::demo_patching
include ciscopuppet::cisco::demo_pim
diff --git a/lib/facter/cisco.rb b/lib/facter/cisco.rb
index cc759fd26..a4751f8d9 100644
--- a/lib/facter/cisco.rb
+++ b/lib/facter/cisco.rb
@@ -28,7 +28,6 @@
hash['hardware']['cpu'] = Platform.cpu
hash['hardware']['memory'] = Platform.memory
hash['hardware']['board'] = Platform.board
- hash['hardware']['uptime'] = Platform.uptime
hash['hardware']['last_reset'] = Platform.last_reset
hash['hardware']['reset_reason'] = Platform.reset_reason
@@ -49,6 +48,7 @@
hash['feature_compatible_module_iflist'] = {}
interface_list = Feature.compatible_interfaces('fabricpath')
hash['feature_compatible_module_iflist']['fabricpath'] = interface_list
+ hash['hardware']['uptime'] = Platform.uptime
hash
end
diff --git a/lib/puppet/feature/cisco_node_utils.rb b/lib/puppet/feature/cisco_node_utils.rb
index 65c8b45ff..ef6567fd2 100644
--- a/lib/puppet/feature/cisco_node_utils.rb
+++ b/lib/puppet/feature/cisco_node_utils.rb
@@ -37,7 +37,7 @@ def cisco_node_utils?
@results['cisco_node_utils'] = test('cisco_node_utils',
libs: ['cisco_node_utils'])
if @results['cisco_node_utils']
- rec_version = Gem::Version.new('1.7.0')
+ rec_version = Gem::Version.new('1.8.0')
gem_version = Gem::Version.new(CiscoNodeUtils::VERSION)
if gem_version < rec_version
warn "This module works best with version #{rec_version} of gem "\
diff --git a/lib/puppet/parser/functions/platform_get.rb b/lib/puppet/parser/functions/platform_get.rb
index b0076978b..d5d5d2d60 100644
--- a/lib/puppet/parser/functions/platform_get.rb
+++ b/lib/puppet/parser/functions/platform_get.rb
@@ -32,7 +32,11 @@ module Functions
# - NX-OSv Chassis
case pi
when /Nexus\s?3\d\d\d/
- cisco_hardware = 'n3k'
+ if function_platform_fretta([])
+ cisco_hardware = 'n3k-f'
+ else
+ cisco_hardware = 'n3k'
+ end
when /Nexus\s?5\d\d\d/
cisco_hardware = 'n5k'
when /Nexus\s?6\d\d\d/
diff --git a/lib/puppet/provider/cisco_bgp/cisco.rb b/lib/puppet/provider/cisco_bgp/cisco.rb
index f38fb4520..d203a9334 100644
--- a/lib/puppet/provider/cisco_bgp/cisco.rb
+++ b/lib/puppet/provider/cisco_bgp/cisco.rb
@@ -218,106 +218,32 @@ def timer_bestpath_limit_set
@bgp_vrf.timer_bestpath_limit_set(limit, always)
end
- def legacy_image?
- utils = PuppetX::Cisco::Utils
- fd = Facter.value('cisco')
- image = fd['images']['system_image']
- image[/7.0.3.I2|I3|I4/] || utils.product_tag[/n(5k|6k|7k|9k-f)/]
- end
-
- def event_history_default?(prop)
- @property_hash[prop.to_sym] == @bgp_vrf.send("default_#{prop}")
- end
-
- def event_history_false?(prop)
- @property_hash[prop.to_sym] == 'false'
- end
-
- def event_history_cli
- case resource[:event_history_cli]
- when 'default'
- return 'default' if event_history_default?('event_history_cli')
- when 'true'
- return 'true' if event_history_default?('event_history_cli')
- when 'size_disable'
- return 'size_disable' if
- event_history_false?('event_history_cli') && !legacy_image?
- end
- @property_hash[:event_history_cli]
- end
-
def event_history_cli=(should_value)
- should_value = @bgp_vrf.default_event_history_cli if
- should_value == 'default' || should_value == 'true'
should_value = should_value.to_sym unless should_value =~ /\A\d+\z/
@property_flush[:event_history_cli] = should_value
end
- def event_history_detail
- case resource[:event_history_detail]
- when 'default'
- return 'default' if event_history_default?('event_history_detail')
- when 'size_disable'
- return 'size_disable' if
- event_history_default?('event_history_detail') && !legacy_image?
- end
- @property_hash[:event_history_detail]
- end
-
def event_history_detail=(should_value)
- should_value = @bgp_vrf.default_event_history_detail if
- should_value == 'default'
- should_value = @bgp_vrf.default_event_history_detail if
- should_value == 'size_disable' && !legacy_image?
should_value = should_value.to_sym unless should_value =~ /\A\d+\z/
@property_flush[:event_history_detail] = should_value
end
- def event_history_events
- case resource[:event_history_events]
- when 'default'
- return 'default' if event_history_default?('event_history_events')
- when 'true'
- return 'true' if event_history_default?('event_history_events')
- when 'size_disable'
- return 'size_disable' if event_history_false?('event_history_events')
- when 'size_large'
- return 'size_large' if event_history_default?('event_history_events') &&
- !legacy_image?
- end
- @property_hash[:event_history_events]
- end
-
def event_history_events=(should_value)
- should_value = @bgp_vrf.default_event_history_events if
- should_value == 'default' || should_value == 'true'
- should_value = 'false' if should_value == 'size_disable' && !legacy_image?
- should_value = 'true' if should_value == 'size_large' && !legacy_image?
should_value = should_value.to_sym unless should_value =~ /\A\d+\z/
@property_flush[:event_history_events] = should_value
end
- def event_history_periodic
- case resource[:event_history_periodic]
- when 'default'
- return 'default' if event_history_default?('event_history_periodic')
- when 'true'
- return 'true' if event_history_default?('event_history_periodic') &&
- legacy_image?
- when 'size_disable'
- return 'size_disable' if
- event_history_default?('event_history_periodic') && !legacy_image?
- end
- @property_hash[:event_history_periodic]
+ def event_history_errors=(should_value)
+ should_value = should_value.to_sym unless should_value =~ /\A\d+\z/
+ @property_flush[:event_history_errors] = should_value
+ end
+
+ def event_history_objstore=(should_value)
+ should_value = should_value.to_sym unless should_value =~ /\A\d+\z/
+ @property_flush[:event_history_objstore] = should_value
end
def event_history_periodic=(should_value)
- should_value = @bgp_vrf.default_event_history_periodic if
- should_value == 'default'
- should_value = @bgp_vrf.default_event_history_periodic if
- should_value == 'true' && legacy_image?
- should_value = @bgp_vrf.default_event_history_periodic if
- should_value == 'size_disable' && !legacy_image?
should_value = should_value.to_sym unless should_value =~ /\A\d+\z/
@property_flush[:event_history_periodic] = should_value
end
diff --git a/lib/puppet/provider/cisco_interface/cisco.rb b/lib/puppet/provider/cisco_interface/cisco.rb
index 1884a1fc9..652595016 100644
--- a/lib/puppet/provider/cisco_interface/cisco.rb
+++ b/lib/puppet/provider/cisco_interface/cisco.rb
@@ -1,6 +1,6 @@
# May 2015
#
-# Copyright (c) 2015-2016 Cisco and/or its affiliates.
+# Copyright (c) 2015-2017 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -206,8 +206,9 @@ def self.instances
interfaces = []
Cisco::Interface.interfaces.each do |interface_name, nu_obj|
begin
- # Not allowed to create an interface for mgmt0 or MgmtEth0/*
- next if interface_name.match(/mgmt/i)
+ # Some interfaces cannot or should not be managed by this type.
+ # - NVE Interfaces (managed by cisco_vxlan_vtep type)
+ next if interface_name.match(/nve/i)
interfaces << properties_get(interface_name, nu_obj)
end
end
@@ -223,6 +224,10 @@ def self.prefetch(resources)
end # self.prefetch
def exists?
+ # @nu.state_default returns true if @nu is a physical interface and it's
+ # in a default state. Physical interfaces are treated as resources
+ # that don't exist if they are in a default state.
+ return false unless @nu.nil? || !@nu.state_default
(@property_hash[:ensure] == :present)
end
@@ -352,12 +357,20 @@ def vrf=(val)
end
def flush
+ if @resource['name'][/mgmt/i]
+ msg = 'Management interfaces can be displayed but not configured'
+ fail msg
+ end
+ if @resource['name'][/nve/i]
+ msg = 'Use the cisco_vxlan_vtep type to manage nve interfaces'
+ fail msg
+ end
if @property_flush[:ensure] == :absent
@nu.destroy
@nu = nil
else
# Create/Update
- if @nu.nil?
+ if @nu.nil? || @nu.state_default
new_interface = true
@nu = Cisco::Interface.new(@resource[:interface])
end
diff --git a/lib/puppet/provider/cisco_object_group/cisco.rb b/lib/puppet/provider/cisco_object_group/cisco.rb
new file mode 100644
index 000000000..8b1cc0866
--- /dev/null
+++ b/lib/puppet/provider/cisco_object_group/cisco.rb
@@ -0,0 +1,100 @@
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+require 'cisco_node_utils' if Puppet.features.cisco_node_utils?
+begin
+ require 'puppet_x/cisco/autogen'
+rescue LoadError # seen on master, not on agent
+ # See longstanding Puppet issues #4248, #7316, #14073, #14149, etc. Ugh.
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..',
+ 'puppet_x', 'cisco', 'autogen.rb'))
+end
+
+Puppet::Type.type(:cisco_object_group).provide(:cisco) do
+ desc 'The Cisco provider for cisco_object_group.'
+
+ confine feature: :cisco_node_utils
+
+ mk_resource_methods
+
+ def initialize(value={})
+ super(value)
+ afi = @property_hash[:afi]
+ type = @property_hash[:type]
+ grp_name = @property_hash[:grp_name]
+ @nu = Cisco::ObjectGroup.object_groups[afi][type][grp_name] unless afi.nil?
+ @property_flush = {}
+ end
+
+ def self.properties_get(afi, type, grp_name, _inst)
+ current_state = {
+ name: "#{afi} #{type} #{grp_name}",
+ afi: afi,
+ type: type,
+ grp_name: grp_name,
+ ensure: :present,
+ }
+ new(current_state)
+ end # self.properties_get
+
+ def self.instances
+ instance_array = []
+ Cisco::ObjectGroup.object_groups.each do |afi, types|
+ types.each do |type, grp_names|
+ grp_names.each do |grp_name, inst|
+ begin
+ instance_array << properties_get(afi, type, grp_name, inst)
+ end
+ end
+ end
+ end
+ instance_array
+ end # self.instances
+
+ def self.prefetch(resources)
+ instance_array = instances
+ resources.keys.each do |name|
+ provider = instance_array.find do |objgrp|
+ objgrp.afi.to_s == resources[name][:afi].to_s &&
+ objgrp.type.to_s == resources[name][:type].to_s &&
+ objgrp.grp_name.to_s == resources[name][:grp_name].to_s
+ end
+ resources[name].provider = provider unless provider.nil?
+ end
+ end # self.prefetch
+
+ def exists?
+ (@property_hash[:ensure] == :present)
+ end
+
+ def create
+ @property_flush[:ensure] = :present
+ end
+
+ def destroy
+ @property_flush[:ensure] = :absent
+ end
+
+ def flush
+ if @property_flush[:ensure] == :absent
+ @nu.destroy
+ @nu = nil
+ else
+ if @nu.nil?
+ # create new
+ @nu = Cisco::ObjectGroup.new(@resource[:afi], @resource[:type], @resource[:grp_name])
+ end
+ end
+ end
+end
diff --git a/lib/puppet/provider/cisco_object_group_entry/cisco.rb b/lib/puppet/provider/cisco_object_group_entry/cisco.rb
new file mode 100644
index 000000000..c309a1c65
--- /dev/null
+++ b/lib/puppet/provider/cisco_object_group_entry/cisco.rb
@@ -0,0 +1,152 @@
+# June 2017
+#
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+require 'cisco_node_utils' if Puppet.features.cisco_node_utils?
+begin
+ require 'puppet_x/cisco/autogen'
+rescue LoadError # seen on master, not on agent
+ # See longstanding Puppet issues #4248, #7316, #14073, #14149, etc. Ugh.
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..',
+ 'puppet_x', 'cisco', 'autogen.rb'))
+end
+
+Puppet::Type.type(:cisco_object_group_entry).provide(:cisco) do
+ desc 'The Cisco provider.'
+
+ confine feature: :cisco_node_utils
+ defaultfor operatingsystem: :nexus
+
+ mk_resource_methods
+
+ # Property symbol array for method auto-generation.
+ OGE_NON_BOOL_PROPS = [
+ :address,
+ :port,
+ ]
+
+ PuppetX::Cisco::AutoGen.mk_puppet_methods(:non_bool, self, '@nu',
+ OGE_NON_BOOL_PROPS)
+
+ def initialize(value={})
+ super(value)
+ afi = @property_hash[:afi]
+ type = @property_hash[:type]
+ grp_name = @property_hash[:grp_name]
+ seqno = @property_hash[:seqno]
+ @nu = Cisco::ObjectGroupEntry.object_group_entries[afi][type][grp_name][seqno] unless grp_name.nil? || seqno.nil?
+ @property_flush = {}
+ end
+
+ def self.properties_get(afi, type, grp_name, seqno, instance)
+ debug "Checking object_group_entry instance, #{afi} #{type} #{grp_name} #{seqno}"
+ current_state = {
+ name: "#{afi} #{type} #{grp_name} #{seqno}",
+ afi: afi,
+ type: type,
+ grp_name: grp_name,
+ seqno: seqno,
+ ensure: :present,
+ }
+
+ # Call node_utils getter for each property
+ OGE_NON_BOOL_PROPS.each do |prop|
+ current_state[prop] = instance.send(prop)
+ end
+ new(current_state)
+ end # self.properties_get
+
+ def self.instances
+ oge_hash = []
+ Cisco::ObjectGroupEntry.object_group_entries.each do |afi, types|
+ types.each do |type, grp_names|
+ grp_names.each do |grp_name, entries|
+ entries.each do |seqno, instance|
+ oge_hash << properties_get(afi, type, grp_name, seqno, instance)
+ end
+ end
+ end
+ end
+ oge_hash
+ end
+
+ def self.prefetch(resources)
+ oge_instances = instances
+ resources.keys.each do |name|
+ provider = oge_instances.find do |oge|
+ resources[name][:afi].to_s == oge.afi.to_s &&
+ resources[name][:type].to_s == oge.type.to_s &&
+ resources[name][:grp_name].to_s == oge.grp_name.to_s &&
+ resources[name][:seqno].to_i == oge.seqno.to_i
+ end
+ resources[name].provider = provider unless provider.nil?
+ end
+ end # self.prefetch
+
+ def exists?
+ @property_hash[:ensure] == :present
+ end
+
+ def create
+ @property_flush[:ensure] = :present
+ end
+
+ def destroy
+ @property_flush[:ensure] = :absent
+ end
+
+ def properties_set(new_object_group_entry=false)
+ OGE_NON_BOOL_PROPS.each do |prop|
+ next unless @resource[prop]
+ send("#{prop}=", @resource[prop]) if new_object_group_entry
+ next if @property_flush[prop].nil?
+ @nu.send("#{prop}=", @property_flush[prop]) if
+ @nu.respond_to?("#{prop}=")
+ end
+ entry_set
+ end
+
+ # The following properties are setters and cannot be handled
+ # by PuppetX::Cisco::AutoGen.mk_puppet_methods.
+ def entry_set
+ attrs = {}
+ vars = [
+ :address,
+ :port,
+ ]
+ if vars.any? { |p| @property_flush.key?(p) }
+ # At least one var has changed, get all vals from manifest
+ vars.each do |p|
+ attrs[p] = @resource[p]
+ end
+ end
+ return if attrs.empty?
+ @nu.entry_set(attrs)
+ end
+
+ def flush
+ if @property_flush[:ensure] == :absent
+ @nu.destroy
+ @nu = nil
+ else
+ if @nu.nil?
+ new_object_group_entry = true
+ @nu = Cisco::ObjectGroupEntry.new(@resource[:afi], @resource[:type],
+ @resource[:grp_name], @resource[:seqno])
+ end
+ properties_set(new_object_group_entry)
+ end
+ end
+end
diff --git a/lib/puppet/provider/cisco_route_map/cisco.rb b/lib/puppet/provider/cisco_route_map/cisco.rb
index bcfd06f31..e548614d6 100644
--- a/lib/puppet/provider/cisco_route_map/cisco.rb
+++ b/lib/puppet/provider/cisco_route_map/cisco.rb
@@ -484,7 +484,7 @@ def set_extcommunity_cost_set
def legacy_image?
fd = Facter.value('cisco')
- image = fd['images']['system_image']
+ image = fd['images']['full_version']
image[/7.0.3.I2|I3|I4/]
end
diff --git a/lib/puppet/provider/cisco_snmp_user/cisco.rb b/lib/puppet/provider/cisco_snmp_user/cisco.rb
index aed31dd1d..589cc142a 100644
--- a/lib/puppet/provider/cisco_snmp_user/cisco.rb
+++ b/lib/puppet/provider/cisco_snmp_user/cisco.rb
@@ -214,13 +214,19 @@ def handle_attribute_update
end
def unconfigure_snmp_user
- @snmp_user.destroy
+ # admin user is always present on the device and it
+ # cannot be removed by using 'no' cmd or else
+ # errors will be thrown
+ @snmp_user.destroy unless @resource[:user] == 'admin'
@snmp_user = nil
@property_hash[:ensure] = :absent
end
def flush
if @property_flush[:ensure] == :absent
+ fail ArgumentError,
+ 'The admin account cannot be deactivated on this platform. ' \
+ if @resource[:user] == 'admin'
unconfigure_snmp_user
elsif @property_flush[:ensure] == :present
configure_snmp_user
diff --git a/lib/puppet/provider/package/cisco.rb b/lib/puppet/provider/package/cisco.rb
index 6e2ddcd72..489101c8b 100644
--- a/lib/puppet/provider/package/cisco.rb
+++ b/lib/puppet/provider/package/cisco.rb
@@ -39,7 +39,7 @@
rpm('--version')
yum('--version')
python('--version')
- rescue Puppet::ExecutionFailure
+ rescue Puppet::ExecutionFailure, Puppet::MissingCommand
commands_present = false
end
confine true: commands_present
diff --git a/lib/puppet/provider/radius_global/cisco.rb b/lib/puppet/provider/radius_global/cisco.rb
index 8a12e96a3..a1572826f 100644
--- a/lib/puppet/provider/radius_global/cisco.rb
+++ b/lib/puppet/provider/radius_global/cisco.rb
@@ -1,6 +1,6 @@
-# October, 2015
+# September, 2017
#
-# Copyright (c) 2014-2016 Cisco and/or its affiliates.
+# Copyright (c) 2014-2017 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -31,10 +31,31 @@
mk_resource_methods
- RADIUS_GLOBAL_PROPS = {
- timeout: :timeout,
- retransmit_count: :retransmit_count,
- }
+ RADIUS_GLOBAL_GET_PROPS = [
+ :key,
+ :key_format,
+ ]
+
+ RADIUS_GLOBAL_SET_PROPS = [
+ :retransmit_count,
+ :timeout,
+ ]
+
+ RADIUS_GLOBAL_ARRAY_PROPS = [
+ :source_interface
+ ]
+
+ RADIUS_GLOBAL_NON_BOOL_PROPS = RADIUS_GLOBAL_GET_PROPS +
+ RADIUS_GLOBAL_SET_PROPS
+
+ RADIUS_GLOBAL_CONFIG_PROPS = RADIUS_GLOBAL_SET_PROPS +
+ RADIUS_GLOBAL_ARRAY_PROPS
+
+ PuppetX::Cisco::AutoGen.mk_puppet_methods(:array_flat, self, '@radius_global',
+ RADIUS_GLOBAL_ARRAY_PROPS)
+
+ PuppetX::Cisco::AutoGen.mk_puppet_methods(:non_bool, self, '@radius_global',
+ RADIUS_GLOBAL_NON_BOOL_PROPS)
def initialize(value={})
super(value)
@@ -52,7 +73,9 @@ def self.get_properties(name, v)
timeout: v.timeout ? v.timeout : -1,
retransmit_count: v.retransmit_count ? v.retransmit_count : -1,
key: v.key ? v.key : 'unset',
- key_format: v.key_format ? v.key_format : -1,
+ # Only return the key format if there is a key configured
+ key_format: v.key.nil? || v.key.empty? ? nil : v.key_format,
+ source_interface: v.source_interface.nil? || v.source_interface.empty? ? ['unset'] : [v.source_interface],
}
new(current_state)
@@ -109,6 +132,8 @@ def validate
"This provider does not support the 'enable' property." if @resource[:enable]
fail ArgumentError,
"The 'key' property must be set when specifying 'key_format'." if @resource[:key_format] && !resource[:key]
+ fail ArgumentError,
+ "This provider does not support the 'vrf' property. " if @resource[:vrf]
end
def exists?
@@ -118,13 +143,18 @@ def exists?
def flush
validate
- RADIUS_GLOBAL_PROPS.each do |puppet_prop, cisco_prop|
- if @resource[puppet_prop] && @radius_global.respond_to?("#{cisco_prop}=")
- @radius_global.send("#{cisco_prop}=", munge_flush(@resource[puppet_prop]))
- end
+ RADIUS_GLOBAL_CONFIG_PROPS.each do |prop|
+ next unless @resource[prop]
+ next if @property_flush[prop].nil?
+ # Other platforms require array for some types - Nexus does not
+ @property_flush[prop] = @property_flush[prop][0] if @property_flush[prop].is_a?(Array)
+ # Call the AutoGen setters for the @radius_global node_utils object.
+ @property_flush[prop] = nil if @property_flush[prop] == 'unset'
+ @radius_global.send("#{prop}=", @property_flush[prop]) if
+ @radius_global.respond_to?("#{prop}=")
end
# Handle key and keyformat setting
- @radius_global.send('key_set', munge_flush(@resource[:key]), @resource[:key_format]) if @resource[:key]
+ @radius_global.send('key_set', munge_flush(@property_flush[:key]), munge_flush(@property_flush[:key_format])) if @property_flush[:key]
end
end # Puppet::Type
diff --git a/lib/puppet/provider/snmp_user/cisco.rb b/lib/puppet/provider/snmp_user/cisco.rb
index e07e80415..d512b835e 100644
--- a/lib/puppet/provider/snmp_user/cisco.rb
+++ b/lib/puppet/provider/snmp_user/cisco.rb
@@ -116,7 +116,13 @@ def validate
def flush
validate
- @snmpuser.destroy if @snmpuser
+ if @resource[:name] == 'admin'
+ fail ArgumentError,
+ 'The admin account cannot be deactivated on this platform. ' \
+ if @property_flush[:ensure] == :absent
+ else
+ @snmpuser.destroy if @snmpuser
+ end
@snmpuser = nil
return if @property_flush[:ensure] == :absent
diff --git a/lib/puppet/provider/syslog_server/cisco.rb b/lib/puppet/provider/syslog_server/cisco.rb
index 93053d57d..410fca31c 100644
--- a/lib/puppet/provider/syslog_server/cisco.rb
+++ b/lib/puppet/provider/syslog_server/cisco.rb
@@ -1,4 +1,4 @@
-# November, 2014
+# September, 2017
#
# Copyright (c) 2014-2016 Cisco and/or its affiliates.
#
@@ -31,6 +31,12 @@
mk_resource_methods
+ SYSLOG_SERVER_ALL_PROPS = [
+ :severity_level,
+ :port,
+ :vrf,
+ ]
+
def initialize(value={})
super(value)
@syslogserver = Cisco::SyslogServer.syslogservers[@property_hash[:name]]
@@ -44,7 +50,8 @@ def self.properties_get(syslogserver_name, v)
current_state = {
ensure: :present,
name: syslogserver_name,
- severity_level: v.level,
+ severity_level: v.severity_level,
+ port: v.port,
vrf: v.vrf,
}
@@ -92,7 +99,18 @@ def flush
@syslogserver.destroy
@syslogserver = nil
else
- @syslogserver = Cisco::SyslogServer.new(@resource[:name], @resource[:severity_level], @resource[:vrf])
+ # Create new instance with configured options
+ opts = { 'name' => @resource[:name] }
+ SYSLOG_SERVER_ALL_PROPS.each do |prop|
+ next unless @resource[prop]
+ opts[prop.to_s] = @resource[prop].to_s
+ end
+
+ begin
+ @ntpserver = Cisco::SyslogServer.new(opts)
+ rescue Cisco::CliError => e
+ error "Unable to set new values: #{e.message}"
+ end
end
end
end # Puppet::Type
diff --git a/lib/puppet/provider/syslog_settings/cisco.rb b/lib/puppet/provider/syslog_settings/cisco.rb
index 0d360404e..1fa931e3a 100644
--- a/lib/puppet/provider/syslog_settings/cisco.rb
+++ b/lib/puppet/provider/syslog_settings/cisco.rb
@@ -1,6 +1,6 @@
-# November, 2014
+# September, 2017
#
-# Copyright (c) 2014-2016 Cisco and/or its affiliates.
+# Copyright (c) 2014-2017 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -31,9 +31,23 @@
mk_resource_methods
- SYSLOG_SETTINGS_PROPS = {
- time_stamp_units: :timestamp
- }
+ SYSLOG_SETTINGS_ARRAY_PROPS = [
+ :source_interface
+ ]
+
+ SYSLOG_SETTINGS_NON_BOOL_PROPS = [
+ :console,
+ :monitor,
+ :time_stamp_units,
+ ]
+
+ SYSLOG_CONFIG_PROPS = SYSLOG_SETTINGS_ARRAY_PROPS + SYSLOG_SETTINGS_NON_BOOL_PROPS
+
+ PuppetX::Cisco::AutoGen.mk_puppet_methods(:array_flat, self, '@syslogsetting',
+ SYSLOG_SETTINGS_ARRAY_PROPS)
+
+ PuppetX::Cisco::AutoGen.mk_puppet_methods(:non_bool, self, '@syslogsetting',
+ SYSLOG_SETTINGS_NON_BOOL_PROPS)
def initialize(value={})
super(value)
@@ -46,11 +60,20 @@ def self.properties_get(syslogsetting_name, v)
debug "Checking instance, SyslogSetting #{syslogsetting_name}"
current_state = {
- name: 'default',
- time_stamp_units: v.timestamp,
- ensure: :present,
+ name: 'default',
+ ensure: :present,
}
+ SYSLOG_SETTINGS_ARRAY_PROPS.each do |prop|
+ val = v.send(prop)
+ current_state[prop] = val ? [val] : ['unset']
+ end
+
+ SYSLOG_SETTINGS_NON_BOOL_PROPS.each do |prop|
+ val = v.send(prop)
+ current_state[prop] = val ? val : 'unset'
+ end
+
new(current_state)
end # self.properties_get
@@ -73,7 +96,7 @@ def self.prefetch(resources)
end # self.prefetch
def exists?
- true
+ @property_hash[:ensure] == :present
end
def validate
@@ -83,26 +106,22 @@ def validate
fail ArgumentError,
"This provider does not support the 'enable' property. "\
'Syslog servers are enabled implicitly when using the syslog_server resource.' if @resource[:enable]
- end
-
- def munge_flush(val)
- if val.is_a?(String) && val.eql?('unset')
- nil
- elsif val.is_a?(Symbol)
- val.to_s
- else
- val
- end
+ fail ArgumentError,
+ "This provider does not support the 'vrf' property. " if @resource[:vrf]
end
def flush
validate
- SYSLOG_SETTINGS_PROPS.each do |puppet_prop, cisco_prop|
- if @resource[puppet_prop]
- @syslogsetting.send("#{cisco_prop}=", munge_flush(@resource[puppet_prop])) \
- if @syslogsetting.respond_to?("#{cisco_prop}=")
- end
+ SYSLOG_CONFIG_PROPS.each do |prop|
+ next unless @resource[prop]
+ next if @property_flush[prop].nil?
+ # Other platforms require array for some types - Nexus does not
+ @property_flush[prop] = @property_flush[prop][0] if @property_flush[prop].is_a?(Array)
+ # Call the AutoGen setters for the @syslogsetting node_utils object.
+ @property_flush[prop] = nil if @property_flush[prop] == 'unset'
+ @syslogsetting.send("#{prop}=", @property_flush[prop]) if
+ @syslogsetting.respond_to?("#{prop}=")
end
end
end # Puppet::Type
diff --git a/lib/puppet/provider/tacacs_global/cisco.rb b/lib/puppet/provider/tacacs_global/cisco.rb
index 96d7d92e4..73263a98f 100644
--- a/lib/puppet/provider/tacacs_global/cisco.rb
+++ b/lib/puppet/provider/tacacs_global/cisco.rb
@@ -1,6 +1,6 @@
-# June, 2016
+# December, 2017
#
-# Copyright (c) 2014-2016 Cisco and/or its affiliates.
+# Copyright (c) 2014-2017 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -31,9 +31,30 @@
mk_resource_methods
- TACACS_GLOBAL_PROPS = {
- timeout: :timeout
- }
+ TACACS_GLOBAL_GET_PROPS = [
+ :key,
+ :key_format,
+ ]
+
+ TACACS_GLOBAL_SET_PROPS = [
+ :timeout
+ ]
+
+ TACACS_GLOBAL_ARRAY_PROPS = [
+ :source_interface
+ ]
+
+ TACACS_GLOBAL_NON_BOOL_PROPS = TACACS_GLOBAL_GET_PROPS +
+ TACACS_GLOBAL_SET_PROPS
+
+ TACACS_GLOBAL_CONFIG_PROPS = TACACS_GLOBAL_SET_PROPS +
+ TACACS_GLOBAL_ARRAY_PROPS
+
+ PuppetX::Cisco::AutoGen.mk_puppet_methods(:array_flat, self, '@tacacs_global',
+ TACACS_GLOBAL_ARRAY_PROPS)
+
+ PuppetX::Cisco::AutoGen.mk_puppet_methods(:non_bool, self, '@tacacs_global',
+ TACACS_GLOBAL_NON_BOOL_PROPS)
def initialize(value={})
super(value)
@@ -46,11 +67,13 @@ def self.get_properties(name, v)
debug "Checking instance, TacacsGlobal #{name}"
current_state = {
- ensure: :present,
- name: v.name,
- timeout: v.timeout ? v.timeout : -1,
- key: v.key ? v.key : 'unset',
- key_format: v.key_format ? v.key_format : -1,
+ ensure: :present,
+ name: v.name,
+ timeout: v.timeout,
+ key: v.key.nil? || v.key.empty? ? 'unset' : v.key,
+ # Only return the key format if there is a key configured
+ key_format: v.key.nil? || v.key.empty? ? nil : v.key_format,
+ source_interface: v.source_interface.nil? || v.source_interface.empty? ? ['unset'] : [v.source_interface],
}
new(current_state)
@@ -107,6 +130,8 @@ def validate
"This provider does not support the 'enable' property." if @resource[:enable]
fail ArgumentError,
"The 'key' property must be set when specifying 'key_format'." if @resource[:key_format] && !resource[:key]
+ fail ArgumentError,
+ "This provider does not support the 'vrf' property. " if @resource[:vrf]
end
def exists?
@@ -116,11 +141,17 @@ def exists?
def flush
validate
- TACACS_GLOBAL_PROPS.each do |puppet_prop, cisco_prop|
- if @resource[puppet_prop] && @tacacs_global.respond_to?("#{cisco_prop}=")
- @tacacs_global.send("#{cisco_prop}=", munge_flush(@resource[puppet_prop]))
- end
+ TACACS_GLOBAL_CONFIG_PROPS.each do |prop|
+ next unless @resource[prop]
+ next if @property_flush[prop].nil?
+ # Other platforms require array for some types - Nexus does not
+ @property_flush[prop] = @property_flush[prop][0] if @property_flush[prop].is_a?(Array)
+ # Call the AutoGen setters for the @tacacs_global node_utils object.
+ @property_flush[prop] = nil if @property_flush[prop] == 'unset'
+ @tacacs_global.send("#{prop}=", @property_flush[prop]) if
+ @tacacs_global.respond_to?("#{prop}=")
end
- @tacacs_global.send('encryption_key_set', munge_flush(@resource[:key_format]), @resource[:key]) if @resource[:key]
+
+ @tacacs_global.send('encryption_key_set', munge_flush(@property_flush[:key_format]), munge_flush(@property_flush[:key])) if @property_flush[:key]
end
end # Puppet::Type
diff --git a/lib/puppet/type/cisco_aaa_authorization_login_cfg_svc.rb b/lib/puppet/type/cisco_aaa_authorization_login_cfg_svc.rb
index af8796ae8..d9f6766c7 100644
--- a/lib/puppet/type/cisco_aaa_authorization_login_cfg_svc.rb
+++ b/lib/puppet/type/cisco_aaa_authorization_login_cfg_svc.rb
@@ -81,7 +81,7 @@ def self.title_patterns
end
munge do |val|
- val == 'default' ? :default : val.split
+ val == 'default' ? :default : val
end
def in_sync?(is)
diff --git a/lib/puppet/type/cisco_aaa_authorization_login_exec_svc.rb b/lib/puppet/type/cisco_aaa_authorization_login_exec_svc.rb
index 87b1118da..f07a4dd98 100644
--- a/lib/puppet/type/cisco_aaa_authorization_login_exec_svc.rb
+++ b/lib/puppet/type/cisco_aaa_authorization_login_exec_svc.rb
@@ -81,7 +81,7 @@ def self.title_patterns
end
munge do |val|
- val == 'default' ? :default : val.split
+ val == 'default' ? :default : val
end
def in_sync?(is)
diff --git a/lib/puppet/type/cisco_ace.rb b/lib/puppet/type/cisco_ace.rb
index 11512e7c9..c6525bfac 100644
--- a/lib/puppet/type/cisco_ace.rb
+++ b/lib/puppet/type/cisco_ace.rb
@@ -291,4 +291,12 @@ def name
desc 'Log matches against this entry'
newvalues(:true, :false)
end
+
+ validate do
+ unless self[:remark].nil?
+ fail ArgumentError,
+ "'established' and 'log' properties should not be set for remark ace" unless
+ self[:log].nil? && self[:established].nil?
+ end
+ end
end
diff --git a/lib/puppet/type/cisco_bgp.rb b/lib/puppet/type/cisco_bgp.rb
index d13bf9730..a9b470bc4 100644
--- a/lib/puppet/type/cisco_bgp.rb
+++ b/lib/puppet/type/cisco_bgp.rb
@@ -51,12 +51,12 @@
disable_policy_batching_ipv4 => 'xx',
disable_policy_batching_ipv6 => 'yy',
enforce_first_as => true,
- event_history_cli => 'true',
- event_history_detail => 'small',
- event_history_errors => 'large',
- event_history_events => 'large',
- event_history_objstore => 'medium',
- event_history_periodic => 'disable',
+ event_history_cli => 'size_large',
+ event_history_detail => 'size_large',
+ event_history_errors => 'size_large',
+ event_history_events => 'size_large',
+ event_history_objstore => 'size_medium',
+ event_history_periodic => '100000',
fast_external_fallover => true,
flush_routes => false,
isolate => false,
@@ -348,46 +348,43 @@ def insync?(is)
end # property enforce_first_as
newproperty(:event_history_cli) do
- desc "event_history_cli state. Valid values are True, False, size_small,
- size_medium, size_large, size_disable, size in bytes or 'default'"
+ desc "event_history_cli state. Valid values are False, size_small,
+ size_medium, size_large, size_disable, size in bytes"
end # property event_history_cli
newproperty(:event_history_detail) do
- desc "event_history_detail state. Valid values are True, False, size_small,
- size_medium, size_large, size_disable, size in bytes or 'default'"
+ desc "event_history_detail state. Valid values are False, size_small,
+ size_medium, size_large, size_disable, size in bytes"
end # property event_history_detail
newproperty(:event_history_errors) do
- desc "event_history_errors state. Valid values are True, False, size_small,
- size_medium, size_large, size_disable, size in bytes or 'default'"
+ desc "event_history_errors state. Valid values are False, size_small,
+ size_medium, size_large, size_disable, size in bytes"
munge do |value|
- value = 'size_medium' if value == 'true'
- value = 'false' if value == 'size_disable'
value = value.to_sym unless value =~ /\A\d+\z/
value
end
end # property event_history_errors
newproperty(:event_history_events) do
- desc "event_history_events state. Valid values are True, False, size_small,
- size_medium, size_large, size_disable, size in bytes or 'default'"
+ desc "event_history_events state. Valid values are False, size_small,
+ size_medium, size_large, size_disable, size in bytes"
end # property event_history_events
newproperty(:event_history_objstore) do
- desc "event_history_objstore state. Valid values are True, False, size_small,
- size_medium, size_large, size_disable, size in bytes or 'default'"
+ desc "event_history_objstore state. Valid values are False, size_small,
+ size_medium, size_large, size_disable, size in bytes"
munge do |value|
- value = 'false' if value == 'size_disable'
value = value.to_sym unless value =~ /\A\d+\z/
value
end
end # property event_history_objstore
newproperty(:event_history_periodic) do
- desc "event_history_periodic state. Valid values are True, False, size_small,
- size_medium, size_large, size_disable, size in bytes or 'default'"
+ desc "event_history_periodic state. Valid values are False, size_small,
+ size_medium, size_large, size_disable, size in bytes"
end # property event_history_periodic
newproperty(:fast_external_fallover) do
diff --git a/lib/puppet/type/cisco_bridge_domain.rb b/lib/puppet/type/cisco_bridge_domain.rb
index 450d19d55..8b6c3d571 100644
--- a/lib/puppet/type/cisco_bridge_domain.rb
+++ b/lib/puppet/type/cisco_bridge_domain.rb
@@ -79,8 +79,7 @@ def self.title_patterns
desc "The bridge-domain name. Valid values are String or keyword 'default'."
munge do |value|
- fail 'BD Name is not a valid string' unless value.is_a?(String)
- value = :default if value == 'default'
+ value = '' if value == 'default'
value
end
end # property name
@@ -88,18 +87,14 @@ def self.title_patterns
newproperty(:fabric_control) do
desc %(Specifies this bridge-domain as the fabric control bridge-domain.
Only one bridge-domain or VLAN can be configured as fabric-control.
- Valid values are true, false.)
+ Valid values are true, false, 'default'.)
- newvalues(
- :true,
- :false)
+ newvalues(:true, :false, :default)
end # property fabric_control
newproperty(:shutdown) do
desc "Specifies the shutdown state of the bridge-domain. Valid values are true, false, 'default'."
- newvalues(
- :true,
- :false)
+ newvalues(:true, :false, :default)
end # property shutdown
end # Puppet::Type.newtype
diff --git a/lib/puppet/type/cisco_interface.rb b/lib/puppet/type/cisco_interface.rb
index d3e74f142..33dc721a7 100755
--- a/lib/puppet/type/cisco_interface.rb
+++ b/lib/puppet/type/cisco_interface.rb
@@ -141,12 +141,6 @@
newparam(:interface, namevar: :true) do
desc 'Name of the interface on the network element. Valid values are string.'
- validate do |name|
- if name[/mgmt/i]
- fail('Stay away from the management port.')
- end # if
- end
-
munge(&:downcase)
end # param name
diff --git a/lib/puppet/type/cisco_object_group.rb b/lib/puppet/type/cisco_object_group.rb
new file mode 100644
index 000000000..5ea0009af
--- /dev/null
+++ b/lib/puppet/type/cisco_object_group.rb
@@ -0,0 +1,91 @@
+#
+# Puppet resource type for cisco_object_group
+#
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+Puppet::Type.newtype(:cisco_object_group) do
+ # ---------------------------------------------------------------
+ # @doc entry to describe the resource and usage
+ # ---------------------------------------------------------------
+ @doc = "Manages configuration of an object_group instance
+
+ ~~~puppet
+ cisco_object_group {'':
+ ..attributes..
+ }
+ ~~~
+
+ `` is the name of the object_group instance.
+
+ Example:
+
+ ~~~puppet
+ cisco_object_group { 'ipv4 port MyObjGrp1' :
+ ensure => present,
+ }
+ ~~~
+
+ ~~~puppet
+ cisco_object_group { 'ipv6 address MyObjGrp2' :
+ ensure => present,
+ }
+ ~~~
+ "
+
+ ensurable
+
+ ###################
+ # Resource Naming #
+ ###################
+
+ # Parse the title to populate the attributes in these patterns.
+ # These attributes may be overwritten later.
+ def self.title_patterns
+ identity = ->(x) { x }
+ [
+ [
+ /^(\S+)\s+(\S+)\s+(\S+)$/,
+ [
+ [:afi, identity],
+ [:type, identity],
+ [:grp_name, identity],
+ ],
+ ]
+ ]
+ end
+
+ newparam(:afi, namevar: true) do
+ desc 'The Address-Family Indentifier (ipv4|ipv6).'
+ newvalues(:ipv4, :ipv6)
+ end
+
+ newparam(:type, namevar: true) do
+ desc 'Type of the object_group instance.'
+ newvalues(:address, :port)
+ end
+
+ newparam(:grp_name, namevar: true) do
+ desc 'Name of the object_group instance. Valid values are string.'
+ end
+
+ # Overwrites the name method which by default returns only self[:name].
+ def name
+ "#{self[:afi]} #{self[:type]} #{self[:grp_name]}"
+ end
+
+ # Only needed to satisfy name parameter.
+ newparam(:name) do
+ end
+end
diff --git a/lib/puppet/type/cisco_object_group_entry.rb b/lib/puppet/type/cisco_object_group_entry.rb
new file mode 100644
index 000000000..a97557cd1
--- /dev/null
+++ b/lib/puppet/type/cisco_object_group_entry.rb
@@ -0,0 +1,140 @@
+# Manages configuration for cisco_object_group_entry
+#
+# June 2017
+#
+# Copyright (c) 2016 Cisco and/or its affiliates.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+require 'ipaddr'
+begin
+ require 'puppet_x/cisco/cmnutils'
+rescue LoadError # seen on master, not on agent
+ # See longstanding Puppet issues #4248, #7316, #14073, #14149, etc. Ugh.
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', '..',
+ 'puppet_x', 'cisco', 'cmnutils.rb'))
+end
+
+Puppet::Type.newtype(:cisco_object_group_entry) do
+ @doc = "Manages ObjectGroupEntry configuration.
+
+ ~~~puppet
+ cisco_object_group_entry { ' ':
+ ..attributes..
+ }
+ ~~~
+
+ ` ` is the title of the object_group_entry resource.
+
+ Example:
+
+ ~~~puppet
+ cisco_object_group_entry { 'ipv4 address my_obj_grp_entry1 10':
+ address => '1.2.3.4 2.3.4.5',
+ }
+ cisco_object_group_entry { 'ipv6 address my_obj_grp_entry2 10':
+ address => '2000::1/64',
+ }
+ cisco_object_group_entry { 'ipv4 port my_obj_grp_entry3 20':
+ port => 'eq 40',
+ }
+ cisco_object_group_entry { 'ipv4 port my_obj_grp_entry4 30':
+ port => 'range 40 100',
+ }
+ ~~~
+ "
+
+ ###################
+ # Resource Naming #
+ ###################
+ # Parse out the title to fill in the attributes in these patterns. These
+ # attributes can be overwritten later.
+
+ def self.title_patterns
+ identity = ->(x) { x }
+ [
+ [
+ /^(ipv4|ipv6)\s+(\S+)\s+(\S+)\s+(\d+)$/,
+ [
+ [:afi, identity],
+ [:type, identity],
+ [:grp_name, identity],
+ [:seqno, identity],
+ ],
+ ]
+ ]
+ end
+
+ ##############
+ # Parameters #
+ ##############
+
+ ensurable
+
+ # Overwrites the name method which by default returns only
+ # self[:name].
+ def name
+ "#{self[:afi]} #{self[:type]} #{self[:grp_name]} #{self[:seqno]}"
+ end
+
+ # Only needed to satisfy name parameter.
+ newparam(:name) do
+ end
+
+ newparam(:afi, namevar: true) do
+ desc 'The Address-Family Identifier (ipv4|ipv6).'
+ newvalues(:ipv4, :ipv6)
+ end
+
+ newparam(:type, namevar: true) do
+ desc 'Type of the object_group instance.'
+ newvalues(:address, :port)
+ end
+
+ newparam(:grp_name, namevar: true) do
+ desc 'Object Group Entry name'
+ end
+
+ newparam(:seqno, namevar: true) do
+ desc 'Sequence number of the entry'
+ end
+
+ ##############
+ # Properties #
+ ##############
+
+ newproperty(:address) do
+ desc 'Address to match against. Valid values are an IP'\
+ ' address/prefix_len, IP Address and wildcard, host and '\
+ 'host address'
+
+ validate do |address|
+ addr_arr = address.split
+ addr_arr.each do |addr|
+ next if addr == 'host'
+ PuppetX::Cisco::Utils.process_network_mask(addr)
+ end
+ end
+ end
+
+ newproperty(:port) do
+ desc 'port number to match against. valid'\
+ ' port configuration should be eq 40 or range 30 50 etc.'
+
+ validate do |port|
+ fail 'port should be eq , neq, lt, gt or '\
+ "range. port: #{port} " unless
+ /eq \S+|neq \S+|lt \S+|gt \S+|range \S+ \S+/.match(port)
+ end
+ end
+end
diff --git a/lib/puppet_x/cisco/cmnutils.rb b/lib/puppet_x/cisco/cmnutils.rb
index d0f32a0f5..70d40c5c2 100644
--- a/lib/puppet_x/cisco/cmnutils.rb
+++ b/lib/puppet_x/cisco/cmnutils.rb
@@ -242,7 +242,7 @@ def self.product_tag
data = Facter.value('cisco')
case data['inventory']['chassis']['pid']
when /N3/
- tag = 'n3k'
+ tag = data['images']['full_version'][/7.0.3.F/] ? 'n3k-f' : 'n3k'
when /N5/
tag = 'n5k'
when /N6/
@@ -250,7 +250,7 @@ def self.product_tag
when /N7/
tag = 'n7k'
when /N9/
- tag = data['images']['system_image'][/7.0.3.F/] ? 'n9k-f' : 'n9k'
+ tag = data['images']['full_version'][/7.0.3.F/] ? 'n9k-f' : 'n9k'
else
fail "Unrecognized product_id: #{data['inventory']['chassis']['pid']}"
end
diff --git a/metadata.json b/metadata.json
index e3be10fc4..5c9fc69b6 100644
--- a/metadata.json
+++ b/metadata.json
@@ -1,6 +1,6 @@
{
"name": "puppetlabs-ciscopuppet",
- "version": "1.7.0",
+ "version": "1.8.0",
"author": "cisco",
"summary": "Cisco Puppet providers and types for NX-OS devices",
"license": "Apache-2.0",
@@ -8,7 +8,7 @@
"project_page": "https://github.com/cisco/cisco-network-puppet-module",
"issues_url": "https://github.com/cisco/cisco-network-puppet-module/issues",
"dependencies": [
- { "name": "puppetlabs/netdev_stdlib", "version_requirement": ">=0.12.0" }
+ { "name": "puppetlabs/netdev_stdlib", "version_requirement": ">=0.13.0" }
],
"requirements": [
{
@@ -35,12 +35,15 @@
"7.0(3)I4",
"7.0(3)I5",
"7.0(3)I6",
+ "7.0(3)I7",
"7.3(0)N1",
"7.3(0)D1",
"7.0(3)F1",
"7.0(3)F2",
+ "7.0(3)F3",
"8.0(1)",
- "8.1(1)"
+ "8.1(1)",
+ "8.2(1)"
]
}
]
diff --git a/tests/beaker_tests/cisco_bfd_global/test_bfd_global.rb b/tests/beaker_tests/cisco_bfd_global/test_bfd_global.rb
index a4a19ad59..18a78c6e7 100644
--- a/tests/beaker_tests/cisco_bfd_global/test_bfd_global.rb
+++ b/tests/beaker_tests/cisco_bfd_global/test_bfd_global.rb
@@ -90,7 +90,7 @@
}
}
-tests[:default][:resource].merge!(resource[:n3k]) if platform[/n3k/]
+tests[:default][:resource].merge!(resource[:n3k]) if platform[/n3k$/]
# Non-default Tests. NOTE: [:resource] = [:manifest_props] for all non-default
diff --git a/tests/beaker_tests/cisco_bgp/test_bgp.rb b/tests/beaker_tests/cisco_bgp/test_bgp.rb
index 9505d6654..c8e6ab72a 100644
--- a/tests/beaker_tests/cisco_bgp/test_bgp.rb
+++ b/tests/beaker_tests/cisco_bgp/test_bgp.rb
@@ -47,12 +47,6 @@
bestpath_med_non_deterministic: 'default',
disable_policy_batching: 'default',
enforce_first_as: 'default',
- event_history_cli: 'default',
- event_history_detail: 'default',
- event_history_errors: 'default',
- event_history_events: 'default',
- event_history_objstore: 'default',
- event_history_periodic: 'default',
fast_external_fallover: 'default',
flush_routes: 'default',
graceful_restart: 'default',
@@ -81,12 +75,6 @@
'bestpath_med_non_deterministic' => 'false',
'disable_policy_batching' => 'false',
'enforce_first_as' => 'true',
- 'event_history_cli' => 'size_small',
- 'event_history_detail' => 'false',
- 'event_history_errors' => 'size_medium',
- 'event_history_events' => 'size_large',
- 'event_history_objstore' => 'false',
- 'event_history_periodic' => 'false',
'fast_external_fallover' => 'true',
'flush_routes' => 'false',
'graceful_restart' => 'true',
@@ -107,17 +95,6 @@
},
}
-# older_version default value
-resource = {
- legacy: {
- 'event_history_events' => 'size_small',
- 'event_history_periodic' => 'size_small',
- }
-}
-
-tests[:default][:resource].merge!(resource[:legacy]) if
- nexus_image[/I2|I3|I4/] || platform[/n5|n6|n7|n9k-f/]
-
# Non-default Tests. NOTE: [:resource] = [:manifest_props] for all non-default
tests[:non_default] = {
desc: '2.1 Non Defaults',
@@ -135,11 +112,11 @@
confederation_peers: ['200.1', '23.4', '55', '88'],
disable_policy_batching: 'true',
enforce_first_as: 'false',
- event_history_cli: 'size_medium',
+ event_history_cli: 'size_large',
event_history_detail: 'size_large',
- event_history_errors: 'size_small',
+ event_history_errors: 'size_large',
event_history_events: 'size_medium',
- event_history_objstore: 'size_large',
+ event_history_objstore: 'size_medium',
event_history_periodic: '100000',
fast_external_fallover: 'false',
flush_routes: 'true',
@@ -187,6 +164,8 @@ def unsupp_prop_xr(tests, id)
:event_history_cli <<
:event_history_detail <<
:event_history_events <<
+ :event_history_errors <<
+ :event_history_objstore <<
:event_history_periodic <<
:flush_routes <<
:graceful_restart_helper <<
@@ -228,7 +207,7 @@ def unsupported_properties(tests, id)
unprops <<
:event_history_errors <<
- :event_history_objstore if platform[/n5|n6|n7|n9k-f/]
+ :event_history_objstore if platform[/n5|n6/]
if vrf != 'default'
# NX-OS does not support these properties under a non-default vrf
@@ -265,9 +244,14 @@ def version_unsupported_properties(_tests, _id)
unprops[:disable_policy_batching_ipv6] = '8.1.1'
unprops[:neighbor_down_fib_accelerate] = '8.1.1'
unprops[:reconnect_interval] = '8.1.1'
- elsif platform[/n3k|n9k$/]
+ unprops[:event_history_errors] = '8.0'
+ unprops[:event_history_objstore] = '8.0'
+ elsif platform[/n3k$|n9k$/]
unprops[:event_history_errors] = '7.0.3.I5.1'
unprops[:event_history_objstore] = '7.0.3.I5.1'
+ elsif platform[/n(3|9)k-f/]
+ unprops[:event_history_errors] = '7.0.3.F3.2'
+ unprops[:event_history_objstore] = '7.0.3.F3.2'
end
unprops
end
diff --git a/tests/beaker_tests/cisco_bgp_af/test_bgpaf.rb b/tests/beaker_tests/cisco_bgp_af/test_bgpaf.rb
index 64c88caf8..ebf3e1b01 100644
--- a/tests/beaker_tests/cisco_bgp_af/test_bgpaf.rb
+++ b/tests/beaker_tests/cisco_bgp_af/test_bgpaf.rb
@@ -266,7 +266,7 @@ def unsupported_properties(tests, id)
end
else
unprops << :advertise_l2vpn_evpn if
- vrf == 'default' || platform[/n(3|6)k/]
+ vrf == 'default' || platform[/n(3|6)k$/]
unprops << :additional_paths_install if platform[/n(3|9)k/]
unprops << :additional_paths_selection if platform[/n9k$/] && nexus_image[/I5.3/]
diff --git a/tests/beaker_tests/cisco_bgp_neighbor_af/test_bgpneighboraf.rb b/tests/beaker_tests/cisco_bgp_neighbor_af/test_bgpneighboraf.rb
index bd138e756..982df8f55 100644
--- a/tests/beaker_tests/cisco_bgp_neighbor_af/test_bgpneighboraf.rb
+++ b/tests/beaker_tests/cisco_bgp_neighbor_af/test_bgpneighboraf.rb
@@ -362,7 +362,7 @@ def cleanup(agent)
test_harness_run(tests, :non_def_ibgp_only)
# -------------------------------------------------------------------
- unless platform[/n3k/]
+ unless platform[/n3k$/]
logger.info("\n#{'-' * 60}\nSection 3. L2VPN Property Testing")
resource_absent_cleanup(agent, 'cisco_bgp', 'BGP CLEAN :: ')
title = '2 default 1.1.1.1 l2vpn evpn'
diff --git a/tests/beaker_tests/cisco_command_config/test_command_config.rb b/tests/beaker_tests/cisco_command_config/test_command_config.rb
index 7847c149a..20d5e8b27 100644
--- a/tests/beaker_tests/cisco_command_config/test_command_config.rb
+++ b/tests/beaker_tests/cisco_command_config/test_command_config.rb
@@ -192,8 +192,21 @@ def test_set_get
logger.info('* check config')
on(agent, cmd_prefix + "test_get='incl loopback1'")
+ # The output of test_get has changed in Puppet5 and newer versions of Puppet.
+ # Old output:
+ # cisco_command_config { 'cc':
+ # test_get => '
+ # interface loopback1
+ # interface loopback10
+ # ',
+ # }
+ # New output:
+ # cisco_command_config { 'cc':
+ # test_get => "\ninterface loopback1\ninterface loopback10\n",
+ # }
+ # Modifying the below regular expression to make ^ and \n optional.
fail_test("TestStep :: set/get :: FAIL\nstdout:\n#{stdout}") unless
- stdout[/^interface loopback1/]
+ stdout[/^?\n?interface loopback1/]
logger.info("#{stepinfo} :: PASS\n#{'-' * 60}\n")
end
diff --git a/tests/beaker_tests/cisco_dhcp_relay_global/test_dhcp_relay_global.rb b/tests/beaker_tests/cisco_dhcp_relay_global/test_dhcp_relay_global.rb
index 0536ce7de..9977c7403 100644
--- a/tests/beaker_tests/cisco_dhcp_relay_global/test_dhcp_relay_global.rb
+++ b/tests/beaker_tests/cisco_dhcp_relay_global/test_dhcp_relay_global.rb
@@ -120,7 +120,7 @@
def unsupported_properties(_tests, _id)
unprops = []
- if platform[/n3k/]
+ if platform[/n3k$/]
unprops <<
:ipv4_src_addr_hsrp
elsif platform[/n(5|6)k/]
@@ -133,7 +133,7 @@ def unsupported_properties(_tests, _id)
unprops <<
:ipv4_sub_option_circuit_id_custom <<
:ipv4_sub_option_circuit_id_string
- elsif platform[/n9k-f/]
+ elsif platform[/n(3|9)k-f/]
unprops <<
:ipv4_src_addr_hsrp <<
:ipv4_sub_option_circuit_id_custom <<
diff --git a/tests/beaker_tests/cisco_hsrp/test_hsrp_global.rb b/tests/beaker_tests/cisco_hsrp/test_hsrp_global.rb
index 4d3721340..1b78ff949 100644
--- a/tests/beaker_tests/cisco_hsrp/test_hsrp_global.rb
+++ b/tests/beaker_tests/cisco_hsrp/test_hsrp_global.rb
@@ -61,7 +61,7 @@
def unsupported_properties(_tests, _id)
unprops = []
- unprops << :bfd_all_intf if platform[/n3k/]
+ unprops << :bfd_all_intf if platform[/n3k$/]
unprops
end
diff --git a/tests/beaker_tests/cisco_interface/test_interface_L2.rb b/tests/beaker_tests/cisco_interface/test_interface_L2.rb
index e15ce64d9..58c3b00d9 100755
--- a/tests/beaker_tests/cisco_interface/test_interface_L2.rb
+++ b/tests/beaker_tests/cisco_interface/test_interface_L2.rb
@@ -1,6 +1,6 @@
# rubocop:disable Style/FileName
###############################################################################
-# Copyright (c) 2014-2016 Cisco and/or its affiliates.
+# Copyright (c) 2014-2017 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -54,11 +54,13 @@
sys_def_switchport: true,
sys_def_sw_shut: true,
manifest_props: {
+ description: 'testing default access properties',
shutdown: 'default',
switchport_autostate_exclude: 'default',
switchport_mode: 'access',
},
resource: {
+ description: 'testing default access properties',
shutdown: 'true',
switchport_autostate_exclude: 'false',
switchport_mode: 'access',
@@ -85,6 +87,7 @@
sys_def_switchport: true,
sys_def_sw_shut: true,
manifest_props: {
+ description: 'testing default trunk properties',
shutdown: 'default',
load_interval_counter_1_delay: 'default',
load_interval_counter_2_delay: 'default',
@@ -99,6 +102,7 @@
},
resource: {
+ description: 'testing default trunk properties',
shutdown: 'true',
load_interval_counter_1_delay: '30',
load_interval_counter_2_delay: '300',
@@ -141,6 +145,9 @@
manifest_props: {
purge_config: 'true'
},
+ resource: {
+ ensure: 'absent'
+ },
}
def unsupported_properties(_tests, _id)
@@ -172,7 +179,8 @@ def unsupported_properties(_tests, _id)
# -------------------------------------------------------------------
logger.info("\n#{'-' * 60}\nSection 2.3 Purge_config Testing")
- test_harness_run(tests, :purge)
+ skip_idempotence_check = true
+ test_harness_run(tests, :purge, skip_idempotence_check)
end
logger.info("TestCase :: #{tests[:resource_name]} :: End")
diff --git a/tests/beaker_tests/cisco_interface/test_interface_L3.rb b/tests/beaker_tests/cisco_interface/test_interface_L3.rb
index c5e15701b..eff5e51b6 100755
--- a/tests/beaker_tests/cisco_interface/test_interface_L3.rb
+++ b/tests/beaker_tests/cisco_interface/test_interface_L3.rb
@@ -1,6 +1,6 @@
# rubocop:disable Style/FileName
###############################################################################
-# Copyright (c) 2014-2016 Cisco and/or its affiliates.
+# Copyright (c) 2014-2017 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -44,11 +44,11 @@
tests[:default] = {
desc: '1.1 Default Properties',
title_pattern: intf,
- code: [0],
+ code: [0, 2],
sys_def_switchport: false,
manifest_props: {
+ description: 'Verify default L3 properties',
bfd_echo: 'default',
- description: 'default',
duplex: 'default',
ipv4_forwarding: 'default',
ipv4_pim_sparse_mode: 'default',
@@ -68,6 +68,7 @@
vrf: 'default',
},
resource: {
+ description: 'Verify default L3 properties',
duplex: 'auto',
ipv4_forwarding: 'false',
ipv4_pim_sparse_mode: 'false',
diff --git a/tests/beaker_tests/cisco_interface/test_interface_capabilities.rb b/tests/beaker_tests/cisco_interface/test_interface_capabilities.rb
index 89a48a031..6901e5881 100755
--- a/tests/beaker_tests/cisco_interface/test_interface_capabilities.rb
+++ b/tests/beaker_tests/cisco_interface/test_interface_capabilities.rb
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2016 Cisco and/or its affiliates.
+# Copyright (c) 2016-2017 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -50,6 +50,7 @@
title_pattern: intf,
code: [0, 2],
manifest_props: {
+ description: 'Testing default properties',
switchport_mode: 'disabled',
# interface_pre_check() will define add'l properties
},
diff --git a/tests/beaker_tests/cisco_interface/test_interface_private_vlan.rb b/tests/beaker_tests/cisco_interface/test_interface_private_vlan.rb
index 99edba0eb..bb8cdbecc 100755
--- a/tests/beaker_tests/cisco_interface/test_interface_private_vlan.rb
+++ b/tests/beaker_tests/cisco_interface/test_interface_private_vlan.rb
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2016 Cisco and/or its affiliates.
+# Copyright (c) 2016-2017 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -49,9 +49,10 @@
tests[:default] = {
desc: '1.1 Default Properties',
title_pattern: intf,
- code: [0],
+ code: [0, 2],
sys_def_switchport: true,
manifest_props: {
+ description: 'Test default private vlan properties',
switchport_pvlan_host: 'default',
switchport_pvlan_host_association: 'default',
switchport_pvlan_mapping: 'default',
@@ -64,6 +65,7 @@
switchport_pvlan_trunk_secondary: 'default',
},
resource: {
+ description: 'Test default private vlan properties',
switchport_pvlan_host: 'false',
# switchport_pvlan_host_association: nil,
# switchport_pvlan_mapping: nil,
@@ -161,7 +163,7 @@
# This method overrides utilitylib.rb:unsupported_properties()
def unsupported_properties(_tests, _id)
unprops = []
- if platform[/n3k/]
+ if platform[/n3k$/]
unprops <<
:switchport_pvlan_mapping_trunk <<
:switchport_pvlan_trunk_association <<
diff --git a/tests/beaker_tests/cisco_interface/test_interface_stp.rb b/tests/beaker_tests/cisco_interface/test_interface_stp.rb
index 91c90d925..5797ce926 100755
--- a/tests/beaker_tests/cisco_interface/test_interface_stp.rb
+++ b/tests/beaker_tests/cisco_interface/test_interface_stp.rb
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2016 Cisco and/or its affiliates.
+# Copyright (c) 2016-2017 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -46,8 +46,10 @@
tests[:default] = {
desc: '1.1 Default Properties',
title_pattern: intf,
- code: [0],
+ code: [0, 2],
manifest_props: {
+ description: 'Test default properties',
+ switchport_mode: 'access',
stp_bpdufilter: 'default',
stp_bpduguard: 'default',
stp_cost: 'default',
@@ -61,6 +63,7 @@
stp_vlan_port_priority: 'default',
},
resource: {
+ 'description' => 'Test default properties',
'stp_bpdufilter' => 'false',
'stp_bpduguard' => 'false',
'stp_cost' => 'auto',
diff --git a/tests/beaker_tests/cisco_interface/test_interface_svi.rb b/tests/beaker_tests/cisco_interface/test_interface_svi.rb
index 391cd3f4f..fa5baadbb 100755
--- a/tests/beaker_tests/cisco_interface/test_interface_svi.rb
+++ b/tests/beaker_tests/cisco_interface/test_interface_svi.rb
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2014-2016 Cisco and/or its affiliates.
+# Copyright (c) 2014-2017 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -46,10 +46,12 @@
desc: "1.1 Default 'mgmt'",
title_pattern: intf,
manifest_props: {
- svi_management: 'default'
+ description: 'Test default properties',
+ svi_management: 'default',
},
resource: {
- svi_management: 'false'
+ description: 'Test default properties',
+ svi_management: 'false',
},
}
diff --git a/tests/beaker_tests/cisco_interface_portchannel/test_interface_portchannel.rb b/tests/beaker_tests/cisco_interface_portchannel/test_interface_portchannel.rb
index 10b08633e..fa43b5ab3 100755
--- a/tests/beaker_tests/cisco_interface_portchannel/test_interface_portchannel.rb
+++ b/tests/beaker_tests/cisco_interface_portchannel/test_interface_portchannel.rb
@@ -90,7 +90,7 @@
'lacp_graceful_convergence' => 'true',
'lacp_max_bundle' => '32',
'lacp_min_links' => '1',
- 'lacp_suspend_individual' => platform[/n3k/] ? 'false' : 'true',
+ 'lacp_suspend_individual' => platform[/n3k$/] ? 'false' : 'true',
'port_hash_distribution' => 'false',
'port_load_defer' => 'false',
},
@@ -105,7 +105,7 @@
lacp_graceful_convergence: 'false',
lacp_max_bundle: '10',
lacp_min_links: '3',
- lacp_suspend_individual: platform[/n3k/] ? 'true' : 'false',
+ lacp_suspend_individual: platform[/n3k$/] ? 'true' : 'false',
port_hash_distribution: 'fixed',
port_load_defer: 'true',
},
diff --git a/tests/beaker_tests/cisco_object_group/test_object_group.rb b/tests/beaker_tests/cisco_object_group/test_object_group.rb
new file mode 100644
index 000000000..d536a9439
--- /dev/null
+++ b/tests/beaker_tests/cisco_object_group/test_object_group.rb
@@ -0,0 +1,107 @@
+###############################################################################
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###############################################################################
+#
+# See README-develop-beaker-scripts.md (Section: Test Script Variable Reference)
+# for information regarding:
+# - test script general prequisites
+# - command return codes
+# - A description of the 'tests' hash and its usage
+#
+###############################################################################
+require File.expand_path('../../lib/utilitylib.rb', __FILE__)
+
+# Test hash top-level keys
+tests = {
+ master: master,
+ agent: agent,
+ platform: 'n(3|7|9)k',
+ resource_name: 'cisco_object_group_entry',
+}
+
+# Skip -ALL- tests if a top-level platform/os key exludes this platform
+skip_unless_supported(tests)
+
+tests[:seq_10_v4] = {
+ title_pattern: 'ipv4 address beaker 10',
+ manifest_props: {
+ address: '1.2.3.4 2.3.4.5'
+ },
+}
+
+tests[:seq_10_v6] = {
+ desc: 'IPv6 Seq 10',
+ title_pattern: 'ipv6 address beaker6 10',
+ manifest_props: {
+ address: '1:1::1/64'
+ },
+}
+
+tests[:seq_20_v4] = {
+ title_pattern: 'ipv4 port beakerp 20',
+ manifest_props: {
+ port: 'eq 40'
+ },
+}
+
+tests[:seq_30_v4] = {
+ desc: 'IPv4 Seq 30',
+ title_pattern: 'ipv4 port beakerp 30',
+ manifest_props: {
+ port: 'range 300 550'
+ },
+}
+
+def dependency_manifest(_tests, _id)
+ "
+ cisco_object_group { 'ipv4 address beaker':
+ ensure => present,
+ }
+
+ cisco_object_group { 'ipv6 address beaker6':
+ ensure => present,
+ }
+
+ cisco_object_group { 'ipv4 port beakerp':
+ ensure => present,
+ }
+ "
+end
+
+def cleanup
+ logger.info('Testcase Cleanup:')
+ resource_absent_cleanup(agent, 'cisco_object_group_entry')
+ resource_absent_cleanup(agent, 'cisco_object_group')
+end
+
+#################################################################
+# TEST CASE EXECUTION
+#################################################################
+test_name "TestCase :: #{tests[:resource_name]}" do
+ cleanup
+ teardown { cleanup }
+
+ # ---------------------------------------------------------
+ logger.info("\n#{'-' * 60}\nSection 1. ObjectGroup Testing")
+
+ test_harness_run(tests, :seq_10_v4)
+ test_harness_run(tests, :seq_10_v6)
+ test_harness_run(tests, :seq_20_v4)
+ test_harness_run(tests, :seq_30_v4)
+
+ # ---------------------------------------------------------
+ skipped_tests_summary(tests)
+end
+logger.info("TestCase :: #{tests[:resource_name]} :: End")
diff --git a/tests/beaker_tests/cisco_overlay_global/test_overlay_global.rb b/tests/beaker_tests/cisco_overlay_global/test_overlay_global.rb
index fa4e4043c..f957b99c5 100755
--- a/tests/beaker_tests/cisco_overlay_global/test_overlay_global.rb
+++ b/tests/beaker_tests/cisco_overlay_global/test_overlay_global.rb
@@ -75,7 +75,7 @@
def unsupported_properties(_tests, _id)
unprops = []
- if platform[/n3k/]
+ if platform[/n3k$/]
unprops <<
:anycast_gateway_mac <<
:dup_host_ip_addr_detection_host_moves <<
@@ -86,7 +86,7 @@ def unsupported_properties(_tests, _id)
def version_unsupported_properties(_tests, _id)
unprops = {}
- if platform[/n3k/]
+ if platform[/n3k$/]
unprops[:dup_host_mac_detection_host_moves] = '7.0.3.I6.1'
unprops[:dup_host_mac_detection_timeout] = '7.0.3.I6.1'
end
diff --git a/tests/beaker_tests/cisco_portchannel_global/test_portchannel_global.rb b/tests/beaker_tests/cisco_portchannel_global/test_portchannel_global.rb
index 79d49233a..488fe99db 100755
--- a/tests/beaker_tests/cisco_portchannel_global/test_portchannel_global.rb
+++ b/tests/beaker_tests/cisco_portchannel_global/test_portchannel_global.rb
@@ -111,9 +111,9 @@
},
}
-tests[:non_default][:manifest_props].merge!(manifest_non[:n3k]) if platform[/n3k/]
+tests[:non_default][:manifest_props].merge!(manifest_non[:n3k]) if platform[/n3k$/]
tests[:non_default][:manifest_props].merge!(manifest_non[:n56k]) if platform[/n(5|6)k/]
-tests[:non_default][:manifest_props].merge!(manifest_non[:n9kf]) if platform[/n9k-f/]
+tests[:non_default][:manifest_props].merge!(manifest_non[:n9kf]) if platform[/n(3|9)k-f/]
tests[:non_default][:manifest_props].merge!(manifest_non[:n9k]) if platform[/n9k$/]
def unsupported_properties(tests, _id)
@@ -133,23 +133,23 @@ def unsupported_properties(tests, _id)
:resilient <<
:rotate <<
:symmetry
- elsif platform[/n3k/]
+ elsif platform[/n(3|9)k-f/]
unprops <<
:asymmetric <<
:concatenation <<
:hash_distribution <<
:hash_poly <<
:load_defer <<
- :rotate
- elsif platform[/n9k-f/]
+ :resilient <<
+ :symmetry
+ elsif platform[/n3k/]
unprops <<
:asymmetric <<
:concatenation <<
:hash_distribution <<
:hash_poly <<
:load_defer <<
- :resilient <<
- :symmetry
+ :rotate
elsif platform[/n9k/]
unprops <<
:asymmetric <<
@@ -162,7 +162,7 @@ def unsupported_properties(tests, _id)
unprops
end
-if platform[/n3k/]
+if platform[/n3k$/]
tests[:resilient_unsupported] =
resource_probe(agent,
'cisco_portchannel_global default resilient=true',
@@ -271,6 +271,24 @@ def unsupported_properties(tests, _id)
mhash[:bundle_select] = rhash[:bundle_select] = 'src'
test_harness_run(tests, id)
+ elsif device == 'n3k-f'
+ tests[id][:desc] = '2.2 Non Defaults'
+ mhash[:bundle_hash] = rhash[:bundle_hash] = 'ip-l4port-vlan'
+ test_harness_run(tests, id)
+
+ tests[id][:desc] = '2.3 Non Defaults'
+ mhash[:bundle_hash] = rhash[:bundle_hash] = 'ip-vlan'
+ test_harness_run(tests, id)
+
+ tests[id][:desc] = '2.4 Non Defaults'
+ mhash[:bundle_hash] = rhash[:bundle_hash] = 'l4port'
+ test_harness_run(tests, id)
+
+ tests[id][:desc] = '2.5 Non Defaults'
+ mhash[:bundle_hash] = rhash[:bundle_hash] = 'mac'
+ mhash[:bundle_select] = rhash[:bundle_select] = 'src'
+ test_harness_run(tests, id)
+
elsif device == 'n3k'
if tests[:resilient_unsupported]
tests[id][:desc] = '2.2 Non Defaults'
diff --git a/tests/beaker_tests/cisco_route_map/test_route_map.rb b/tests/beaker_tests/cisco_route_map/test_route_map.rb
index 3f454dc25..7a9c12af8 100644
--- a/tests/beaker_tests/cisco_route_map/test_route_map.rb
+++ b/tests/beaker_tests/cisco_route_map/test_route_map.rb
@@ -24,6 +24,14 @@
require File.expand_path('../../lib/utilitylib.rb', __FILE__)
+# In I7 match_src_proto order is not maintained in running config.
+# This behavior is currently observed only on the N9K.
+if platform[/n9k/] && image_version.to_s.strip[/I7/]
+ @src_proto = %w(udp igmp tcp)
+else
+ @src_proto = %w(tcp udp igmp)
+end
+
# Test hash top-level keys
tests = {
master: master,
@@ -290,7 +298,6 @@
match_route_type_nssa_external: 'true',
match_route_type_type_1: 'true',
match_route_type_type_2: 'true',
- match_src_proto: %w(tcp udp igmp),
match_tag: %w(5 342 28 3221),
match_vlan: '32, 45-200, 300-399, 402',
set_as_path_prepend: ['55.77', '12', '45.3'],
@@ -406,6 +413,17 @@
},
}
+tests[:non_default_6] = {
+ desc: '2.6 Non Defaults 6',
+ title_pattern: 'rm6 321 permit',
+ manifest_props: {
+ match_src_proto: %w(tcp udp igmp)
+ },
+ resource: {
+ match_src_proto: @src_proto
+ },
+}
+
def unsupp_n3k
unprops = []
unprops <<
@@ -509,7 +527,7 @@ def unsupp_n9kf
end
def unsupported_properties(_tests, _id)
- if platform[/n3k/]
+ if platform[/n3k$/]
unsupp_n3k
elsif platform[/n(5|6)k/]
unsupp_n56k
@@ -517,21 +535,21 @@ def unsupported_properties(_tests, _id)
unsupp_n7k
elsif platform[/n9k$/]
unsupp_n9k
- elsif platform[/n9k-f/]
+ elsif platform[/n(3|9)k-f/]
unsupp_n9kf
end
end
def version_unsupported_properties(_tests, _id)
unprops = {}
- if platform[/n9k-f/]
+ if platform[/n(3|9)k-f/]
unprops[:match_metric] = '7.0.3.F2.1'
unprops[:set_extcommunity_4bytes_additive] = '7.0.3.F2.1'
unprops[:set_extcommunity_4bytes_non_transitive] = '7.0.3.F2.1'
unprops[:set_extcommunity_4bytes_transitive] = '7.0.3.F2.1'
unprops[:set_ipv4_next_hop_load_share] = '7.0.3.F2.1'
unprops[:set_ipv6_next_hop_load_share] = '7.0.3.F2.1'
- elsif platform[/n9k$/]
+ elsif platform[/n9k/]
unprops[:match_ospf_area] = '7.0.3.I5.1'
unprops[:set_ipv4_next_hop_load_share] = '7.0.3.I5.1'
unprops[:set_ipv6_next_hop_load_share] = '7.0.3.I5.1'
@@ -573,6 +591,7 @@ def cleanup(agent)
test_harness_run(tests, :non_default_3)
test_harness_run(tests, :non_default_4)
test_harness_run(tests, :non_default_5)
+ test_harness_run(tests, :non_default_6)
end
logger.info("TestCase :: #{tests[:resource_name]} :: End")
diff --git a/tests/beaker_tests/cisco_snmp_server/test_snmp_server.rb b/tests/beaker_tests/cisco_snmp_server/test_snmp_server.rb
index 71376e2ee..681a58cdc 100644
--- a/tests/beaker_tests/cisco_snmp_server/test_snmp_server.rb
+++ b/tests/beaker_tests/cisco_snmp_server/test_snmp_server.rb
@@ -31,14 +31,14 @@
resource_name: 'cisco_snmp_server',
}
-# Add an anchor to the platform regexp below so that
-# it only matches non-fretta n9k platforms.
-@def_pkt_size = platform[/n(3|9)k$/] ? '1500' : '0'
+# for fretta running F3.2 or later, this is fixed
+# it will fail if older versions are run
+@def_pkt_size = platform[/n(3|9)k/] ? '1500' : '0'
# Test hash test cases
tests[:default] = {
desc: '1.1 Default Properties',
- code: [0],
+ code: [0, 2],
title_pattern: 'default',
manifest_props: {
aaa_user_cache_timeout: 'default',
diff --git a/tests/beaker_tests/cisco_stp_global/test_stp_global.rb b/tests/beaker_tests/cisco_stp_global/test_stp_global.rb
index 7ecefbe97..7ddadfe21 100644
--- a/tests/beaker_tests/cisco_stp_global/test_stp_global.rb
+++ b/tests/beaker_tests/cisco_stp_global/test_stp_global.rb
@@ -222,14 +222,14 @@ def test_harness_dependencies(_tests, id)
def unsupported_properties(_tests, _id)
unprops = []
- unprops << :domain if platform[/n9k-f/]
+ unprops << :domain if platform[/n(3|9)k-f/]
unprops << :fcoe if platform[/n(3|5|6|7)k/]
unprops
end
def version_unsupported_properties(_tests, _id)
unprops = {}
- unprops[:domain] = '7.0.3.I6.1' if platform[/n3k/]
+ unprops[:domain] = '7.0.3.I6.1' if platform[/n3k$/]
unprops[:domain] = '7.0.3.I6.1' if platform[/n9k$/]
unprops
end
diff --git a/tests/beaker_tests/cisco_vlan/test_vlan.rb b/tests/beaker_tests/cisco_vlan/test_vlan.rb
index 68838a7e4..8c3d3beb6 100644
--- a/tests/beaker_tests/cisco_vlan/test_vlan.rb
+++ b/tests/beaker_tests/cisco_vlan/test_vlan.rb
@@ -102,7 +102,7 @@
# State cannot be modified for extended vlans on N5k and N6k platforms.
tests[:non_default_extended][:manifest_props].delete(:state) if platform[/n(5|6)k/]
-if platform[/n3k/]
+if platform[/n3k$/]
tests[:vn_segment_unsupported] =
resource_probe(agent,
'cisco_vlan 128 mapped_vni=128000',
diff --git a/tests/beaker_tests/cisco_vrf_af/test_vrf_af.rb b/tests/beaker_tests/cisco_vrf_af/test_vrf_af.rb
index 228342561..de607efe5 100644
--- a/tests/beaker_tests/cisco_vrf_af/test_vrf_af.rb
+++ b/tests/beaker_tests/cisco_vrf_af/test_vrf_af.rb
@@ -100,7 +100,7 @@ def unsupported_properties(_tests, _id)
:route_target_export_stitching <<
:route_target_import_stitching
- if platform[/n3k/]
+ if platform[/n3k$/]
unprops <<
:route_target_both_auto <<
:route_target_both_auto_evpn <<
diff --git a/tests/beaker_tests/cisco_vxlan_vtep/test_vxlan_vtep.rb b/tests/beaker_tests/cisco_vxlan_vtep/test_vxlan_vtep.rb
index 6e5ae5a08..be22879b8 100644
--- a/tests/beaker_tests/cisco_vxlan_vtep/test_vxlan_vtep.rb
+++ b/tests/beaker_tests/cisco_vxlan_vtep/test_vxlan_vtep.rb
@@ -28,7 +28,7 @@
agent: agent,
master: master,
operating_system: 'nexus',
- platform: 'n(5|6|7|9)k',
+ platform: 'n(3k-f|5k|6k|7k|9k)',
resource_name: 'cisco_vxlan_vtep',
}
diff --git a/tests/beaker_tests/cisco_vxlan_vtep_vni/test_vxlan_vtep_vni.rb b/tests/beaker_tests/cisco_vxlan_vtep_vni/test_vxlan_vtep_vni.rb
index 47912301c..8c576b3dd 100644
--- a/tests/beaker_tests/cisco_vxlan_vtep_vni/test_vxlan_vtep_vni.rb
+++ b/tests/beaker_tests/cisco_vxlan_vtep_vni/test_vxlan_vtep_vni.rb
@@ -59,7 +59,7 @@
tests = {
master: master,
agent: agent,
- platform: 'n(5|6|7|9)k',
+ platform: 'n(3k-f|5k|6k|7k|9k)',
resource_name: 'cisco_vxlan_vtep_vni',
}
@@ -70,7 +70,7 @@
tests[:default_properties_ingress_replication] = {
desc: '1.1 Default Properties Ingress replication',
title_pattern: 'nve1 10000',
- platform: 'n(7|9)k',
+ platform: 'n(3k-f|9k)',
manifest_props: {
ingress_replication: 'default',
suppress_arp: 'default',
@@ -99,7 +99,7 @@
tests[:ingress_replication_static_peer_list_empty] = {
desc: '2.1 Ingress Replication Static Peer List Empty',
title_pattern: 'nve1 10000',
- platform: 'n(7|9)k',
+ platform: 'n(3k-f|9k)',
manifest_props: {
ingress_replication: 'static',
peer_list: [],
@@ -114,7 +114,7 @@
tests[:peer_list] = {
desc: '2.2 Peer List',
title_pattern: 'nve1 10000',
- platform: 'n(7|9)k',
+ platform: 'n(3k-f|9k)',
manifest_props: {
ingress_replication: 'static',
peer_list: ['1.1.1.1', '2.2.2.2', '3.3.3.3'],
@@ -129,7 +129,7 @@
tests[:peer_list_change_add] = {
desc: '2.3 Peer List Change Add',
title_pattern: 'nve1 10000',
- platform: 'n(7|9)k',
+ platform: 'n(3k-f|9k)',
manifest_props: {
ingress_replication: 'static',
peer_list: ['1.1.1.1', '6.6.6.6', '3.3.3.3', '4.4.4.4'],
@@ -144,7 +144,7 @@
tests[:peer_list_default] = {
desc: '2.4 Peer List Default',
title_pattern: 'nve1 10000',
- platform: 'n(7|9)k',
+ platform: 'n(3k-f|9k)',
manifest_props: {
ingress_replication: 'static',
peer_list: 'default',
@@ -159,7 +159,7 @@
tests[:ingress_replication_bgp] = {
desc: '2.5 Ingress replication BGP',
title_pattern: 'nve1 10000',
- platform: 'n(7|9)k',
+ platform: 'n(3k-f|9k)',
manifest_props: {
ingress_replication: 'bgp',
suppress_arp: 'default',
@@ -233,7 +233,7 @@ def dependency_manifest(_tests, _id)
"
cisco_vxlan_vtep {'nve1':
ensure => present,
- host_reachability => 'evpn',
+ host_reachability => 'flood',
shutdown => 'false',
}
"
@@ -241,11 +241,11 @@ def dependency_manifest(_tests, _id)
def unsupported_properties(_tests, _id)
unprops = []
- if platform[/n(5|6)k/]
+ if platform[/n(5|6|7)k/]
unprops <<
:ingress_replication <<
:peer_list
- elsif platform[/n9k/]
+ elsif platform[/n(3k-f|9k)/]
unprops <<
:suppress_uuc
end
@@ -254,11 +254,7 @@ def unsupported_properties(_tests, _id)
def version_unsupported_properties(_tests, _id)
unprops = {}
- if platform[/n7k/]
- unprops[:ingress_replication] = '8.1.1'
- unprops[:peer_list] = '8.1.1'
- unprops[:suppress_uuc] = '8.1.1'
- end
+ unprops[:suppress_uuc] = '8.1.1' if platform[/n7k/]
unprops
end
diff --git a/tests/beaker_tests/lib/utilitylib.rb b/tests/beaker_tests/lib/utilitylib.rb
index 49e25a0f2..e53279e70 100644
--- a/tests/beaker_tests/lib/utilitylib.rb
+++ b/tests/beaker_tests/lib/utilitylib.rb
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2014-2016 Cisco and/or its affiliates.
+# Copyright (c) 2014-2017 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -73,6 +73,9 @@ def hash_to_patterns(hash)
# Becomes:
# \[\['192.168.5.0\/24', 'nrtemap1'\], \['192.168.6.0\/32'\]\]
if /^\[.*\]$/.match(value)
+ # Handle Puppet 5 line wrap issue
+ value.gsub!(/^[\[]/, '[\n? *').gsub!(', [', ',\n? +?[')
+ # END Handle Puppet 5 line wrap issue
value.gsub!(/[\[\]]/) { |s| '\\' + "#{s}" }.gsub!(/\"/) { |_s| '\'' }
end
value.gsub!(/[\(\)]/) { |s| '\\' + "#{s}" } if /\(.*\)/.match(value)
@@ -134,7 +137,7 @@ def raise_skip_exception(message, testcase)
# Full command string for puppet agent
def puppet_agent_cmd
- PUPPET_BINPATH + 'agent -t'
+ PUPPET_BINPATH + 'agent -t --trace'
end
# Auto generation of properties for manifests
@@ -175,7 +178,7 @@ def prop_hash_to_manifest(attributes)
# Reserved keys
# tests[id][:log_desc] - the final form of the log description
#
-def test_harness_common(tests, id)
+def test_harness_common(tests, id, skip_idempotence_check=false)
tests[id][:ensure] = :present if tests[id][:ensure].nil?
tests[id][:state] = false if tests[id][:state].nil?
tests[id][:desc] = '' if tests[id][:desc].nil?
@@ -184,7 +187,7 @@ def test_harness_common(tests, id)
test_manifest(tests, id)
test_resource(tests, id)
- test_idempotence(tests, id)
+ test_idempotence(tests, id) unless skip_idempotence_check
tests[id].delete(:log_desc)
end
@@ -742,7 +745,7 @@ def supported_property_hash(tests, id, property_hash)
# - Creates manifests
# - Creates puppet resource title strings
# - Cleans resource
-def test_harness_run(tests, id)
+def test_harness_run(tests, id, skip_idempotence_check=false)
return unless platform_supports_test(tests, id)
logger.info("\n * Process test_harness_run")
tests[id][:ensure] = :present if tests[id][:ensure].nil?
@@ -760,7 +763,7 @@ def test_harness_run(tests, id)
# Check for additional pre-requisites
test_harness_dependencies(tests, id)
- test_harness_common(tests, id)
+ test_harness_common(tests, id, skip_idempotence_check)
tests[id][:ensure] = nil
end
@@ -1111,7 +1114,7 @@ def platform
# - Cisco XRv9K Virtual Router
case pi
when /Nexus\s?3\d\d\d/
- @cisco_hardware = 'n3k'
+ @cisco_hardware = image?[/7.0.3.F/] ? 'n3k-f' : 'n3k'
when /Nexus\s?5\d\d\d/
@cisco_hardware = 'n5k'
when /Nexus\s?6\d\d\d/
@@ -1133,15 +1136,20 @@ def platform
@cached_img = nil
def image?(reset_cache=false)
return @cached_img unless @cached_img.nil? || reset_cache
- on(agent, facter_cmd('-p cisco.images.system_image'))
+ on(agent, facter_cmd('-p cisco.images.full_version'))
@cached_img = stdout.nil? ? '' : stdout
end
@image = nil # Cache the lookup result
def nexus_image
- facter_opt = '-p cisco.images.system_image'
- image_regexp = /.*\.(\S+\.\S+)\.bin/
+ facter_opt = '-p cisco.images.full_version'
+ image_regexp = /(\S+)/
data = on(agent, facter_cmd(facter_opt)).output
+ darr = data.split("\n")
+ darr.each do |line|
+ next if line.include?('stty') || line.include?('WARN')
+ data = line
+ end
@image ||= image_regexp.match(data)[1]
end
@@ -1245,6 +1253,11 @@ def find_interface(tests, id=nil, skipcheck=true)
# Skip the first interface we find in case it's our access interface.
# TODO: check the interface IP address like we do in node_utils
intf = all.grep(%r{ethernet\d+/\d+$})[1]
+
+ when /mgmt/i
+ all = get_current_resource_instances(tests[:agent], 'network_interface')
+ # TODO: check the interface IP address like we do in node_utils
+ intf = all.grep(/mgmt\d+$/)[0]
end
if skipcheck && intf.nil?
@@ -1460,9 +1473,24 @@ def remove_all_vlans(agent, stepinfo='Remove all vlans & bridge-domains')
end
def remove_all_vrfs(agent)
- found = test_get(agent, "incl 'vrf context' | excl management").split("\n")
- found.map! { |cmd| "no #{cmd}" if cmd[/^vrf context/] }
- test_set(agent, found.compact.join(' ; '))
+ # The output of test_get has changed in Puppet5 and newer versions of Puppet.
+ # Old output:
+ # cisco_command_config { 'cc':
+ # test_get => '
+ # vrf context blue
+ # ',
+ # }
+ # New output:
+ # cisco_command_config { 'cc':
+ # test_get => "\nvrf context blue\n",
+ # }
+ # The following logic handles both output styles.
+ found = test_get(agent, "incl 'vrf context' | excl management")
+ found.gsub!(/\\n/, ' ')
+ vrfs = found.scan(/(vrf context \S+)/)
+ return if vrfs.empty?
+ vrfs.flatten!.map! { |cmd| "no #{cmd}" if cmd[/^?\n?vrf context/] }
+ test_set(agent, vrfs.compact.join(' ; '))
end
# Return yum patch version from host
diff --git a/tests/beaker_tests/radius_global/radius_global_provider_defaults.rb b/tests/beaker_tests/radius_global/radius_global_provider_defaults.rb
index d02f5c109..a0704e415 100644
--- a/tests/beaker_tests/radius_global/radius_global_provider_defaults.rb
+++ b/tests/beaker_tests/radius_global/radius_global_provider_defaults.rb
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2014-2015 Cisco and/or its affiliates.
+# Copyright (c) 2014-2017 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -29,12 +29,12 @@
#
# TestCase:
# ---------
-# This is a radius_global resource test that tests for default value for
-# 'ensure' attribute of a radius_global resource.
+# This is a radius_global resource test that tests default attributes of
+# tacacs_global resource.
#
# There are 2 sections to the testcase: Setup, group of teststeps.
# The 1st step is the Setup teststep that cleans up the switch state.
-# Steps 2-4 deal with cisco_snmp_group_resource and its
+# Steps 2+ deal with radius_global and its
# verification using Puppet Agent and the switch running-config.
#
# The testcode checks for exit_codes from Puppet Agent, Vegas shell and
@@ -58,55 +58,23 @@
result = 'PASS'
testheader = 'radius_global Resource :: All Attributes Defaults'
-# @test_name [TestCase] Executes defaults testcase for radius_global Resource.
-test_name "TestCase :: #{testheader}" do
- # @step [Step] Sets up switch for provider test.
- step 'TestStep :: Setup switch for provider' do
- logger.info('Setup switch for provider')
- end
-
- # @step [Step] Requests manifest from the master server to the agent.
- step 'TestStep :: Get resource present manifest from master' do
- # Expected exit_code is 0 since this is a bash shell cmd.
- on(master, RadiusGlobalLib.create_radius_global_manifest)
-
- # Expected exit_code is 2 since this is a puppet agent cmd with change.
- cmd_str = PUPPET_BINPATH + 'agent -t'
- on(agent, cmd_str, acceptable_exit_codes: [0, 2])
+def cleanup
+ logger.info('Testcase Cleanup:')
- logger.info("Get resource present manifest from master :: #{result}")
- end
-
- # @step [Step] Checks radius_global resource on agent using resource cmd.
- step 'TestStep :: Check radius_global resource presence on agent' do
- # Expected exit_code is 0 since this is a puppet resource cmd.
- # Flag is set to false to check for presence of RegExp pattern in stdout.
- cmd_str = PUPPET_BINPATH + 'resource radius_global default'
- on(agent, cmd_str)
- output = stdout
- search_pattern_in_output(output, { 'key' => add_quotes('44444444') },
- false, self, logger)
- search_pattern_in_output(output, { 'key_format' => '7' },
- false, self, logger)
- search_pattern_in_output(output, { 'retransmit_count' => '4' },
- false, self, logger)
- search_pattern_in_output(output, { 'timeout' => '2' },
- false, self, logger)
+ command_config(agent, 'radius-server timeout 5')
+ command_config(agent, 'radius-server retransmit 1')
+ command_config(agent, 'no ip radius source-interface')
- logger.info("Check radius_global resource presence on agent :: #{result}")
- end
-
- # @step [Step] Requests manifest from the master server to the agent.
- step 'TestStep :: Get resource present (with changes)manifest from master' do
- # Expected exit_code is 0 since this is a bash shell cmd.
- on(master, RadiusGlobalLib.create_radius_global_manifest_change)
-
- # Expected exit_code is 2 since this is a puppet agent cmd with change.
- cmd_str = PUPPET_BINPATH + 'agent -t'
- on(agent, cmd_str, acceptable_exit_codes: [2])
+ # To remove a configured key we have ot know the key value
+ on(agent, get_vshell_cmd('show running-config radius | include key'))
+ key = stdout.match('^radius-server key (\d+)\s+(.*)')
+ command_config(agent, "no radius-server key #{key[1]} #{key[2]}", "removing key #{key[2]}") if key
+end
- logger.info("Get resource present manifest from master :: #{result}")
- end
+# @test_name [TestCase] Executes defaults testcase for radius_global Resource.
+test_name "TestCase :: #{testheader}" do
+ cleanup
+ teardown { cleanup }
# @step [Step] Checks radius_global resource on agent using resource cmd.
step 'TestStep :: Check radius_global resource presence on agent' do
@@ -115,45 +83,18 @@
cmd_str = PUPPET_BINPATH + 'resource radius_global default'
on(agent, cmd_str)
output = stdout
- search_pattern_in_output(output, { 'key' => add_quotes('44444444') },
+ search_pattern_in_output(output, { 'key' => 'unset' },
false, self, logger)
- search_pattern_in_output(output, { 'key_format' => '7' },
+ search_pattern_in_output(output, { 'retransmit_count' => '1' },
false, self, logger)
- search_pattern_in_output(output, { 'retransmit_count' => '3' },
+ search_pattern_in_output(output, { 'source_interface' => "['unset']" },
false, self, logger)
- search_pattern_in_output(output, { 'timeout' => '1' },
+ search_pattern_in_output(output, { 'timeout' => '5' },
false, self, logger)
logger.info("Check radius_global resource presence on agent :: #{result}")
end
- # @step [Step] Requests manifest from the master server to the agent.
- step 'TestStep :: Get resource present (with changes)manifest from master' do
- # Expected exit_code is 0 since this is a bash shell cmd.
- on(master, RadiusGlobalLib.create_radius_global_manifest_change_removed)
-
- # Expected exit_code is 2 since this is a puppet agent cmd with change.
- cmd_str = PUPPET_BINPATH + 'agent -t'
- on(agent, cmd_str, acceptable_exit_codes: [2])
-
- logger.info("Get resource present manifest from master :: #{result}")
- end
-
- # @step [Step] Checks radius_global resource on agent using resource cmd.
- step 'TestStep :: Check radius_global resource presence on agent' do
- # Expected exit_code is 0 since this is a puppet resource cmd.
- # Flag is set to false to check for presence of RegExp pattern in stdout.
- cmd_str = PUPPET_BINPATH + 'resource radius_global default'
- on(agent, cmd_str) do
- search_pattern_in_output(stdout, { 'key' => 'unset' },
- false, self, logger)
- search_pattern_in_output(stdout, { 'key_format' => '-1' },
- false, self, logger)
- end
-
- logger.info("Check radius_global resource presence on agent :: #{result}")
- end
-
# @raise [PassTest/FailTest] Raises PassTest/FailTest exception using result.
raise_passfail_exception(result, testheader, self, logger)
end
diff --git a/tests/beaker_tests/radius_global/radius_global_provider_nondefaults.rb b/tests/beaker_tests/radius_global/radius_global_provider_nondefaults.rb
new file mode 100644
index 000000000..98c728cdd
--- /dev/null
+++ b/tests/beaker_tests/radius_global/radius_global_provider_nondefaults.rb
@@ -0,0 +1,185 @@
+###############################################################################
+# Copyright (c) 2014-2017 Cisco and/or its affiliates.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###############################################################################
+# TestCase Name:
+# -------------
+# RadiusGlobal-Provider-NonDefaults.rb
+#
+# TestCase Prerequisites:
+# -----------------------
+# This is a radius_global resource testcase for Puppet Agent on Nexus devices.
+# The test case assumes the following prerequisites are already satisfied:
+# A. Populating the HOSTS configuration file with the agent and master
+# information.
+# B. Enabling SSH connection prerequisites on the N9K switch based Agent.
+# C. Starting of Puppet master server on master.
+# D. Sending to and signing of Puppet agent certificate request on master.
+#
+# TestCase:
+# ---------
+# This is a radius_global resource test that tests non-default attributes of
+# tacacs_global resource.
+#
+# There are 2 sections to the testcase: Setup, group of teststeps.
+# The 1st step is the Setup teststep that cleans up the switch state.
+# Steps 2+ deal with radius_global and its
+# verification using Puppet Agent and the switch running-config.
+#
+# The testcode checks for exit_codes from Puppet Agent, Vegas shell and
+# Bash shell command executions. For Vegas shell and Bash shell command
+# string executions, this is the exit_code convention:
+# 0 - successful command execution, > 0 - failed command execution.
+# For Puppet Agent command string executions, this is the exit_code convention:
+# 0 - no changes have occurred, 1 - errors have occurred,
+# 2 - changes have occurred, 4 - failures have occurred and
+# 6 - changes and failures have occurred.
+# 0 is the default exit_code checked in Beaker::DSL::Helpers::on() method.
+# The testcode also uses RegExp pattern matching on stdout or output IO
+# instance attributes of Result object from on() method invocation.
+#
+###############################################################################
+
+# Require UtilityLib.rb and SnmpGroupLib.rb paths.
+require File.expand_path('../../lib/utilitylib.rb', __FILE__)
+require File.expand_path('../radius_globallib.rb', __FILE__)
+
+result = 'PASS'
+testheader = 'radius_global Resource :: All Attributes Defaults'
+
+def cleanup
+ logger.info('Testcase Cleanup:')
+
+ command_config(agent, 'radius-server timeout 5')
+ command_config(agent, 'radius-server retransmit 1')
+ command_config(agent, 'no ip radius source-interface')
+
+ # To remove a configured key we have ot know the key value
+ on(agent, get_vshell_cmd('show running-config radius | include key'))
+ key = stdout.match('^radius-server key (\d+)\s+(.*)')
+ command_config(agent, "no radius-server key #{key[1]} #{key[2]}", "removing key #{key[2]}") if key
+end
+
+# @test_name [TestCase] Executes non-defaults testcase for radius_global Resource.
+test_name "TestCase :: #{testheader}" do
+ cleanup
+ teardown { cleanup }
+
+ # @step [Step] Sets up switch for provider test.
+ step 'TestStep :: Setup switch for provider' do
+ logger.info('Setup switch for provider')
+ end
+
+ # @step [Step] Requests manifest from the master server to the agent.
+ step 'TestStep :: Get resource present manifest from master' do
+ # Expected exit_code is 0 since this is a bash shell cmd.
+ on(master, RadiusGlobalLib.create_radius_global_manifest)
+
+ # Expected exit_code is 2 since this is a puppet agent cmd with change.
+ cmd_str = PUPPET_BINPATH + 'agent -t'
+ on(agent, cmd_str, acceptable_exit_codes: [0, 2])
+
+ logger.info("Get resource present manifest from master :: #{result}")
+ end
+
+ # @step [Step] Checks radius_global resource on agent using resource cmd.
+ step 'TestStep :: Check radius_global resource presence on agent' do
+ # Expected exit_code is 0 since this is a puppet resource cmd.
+ # Flag is set to false to check for presence of RegExp pattern in stdout.
+ cmd_str = PUPPET_BINPATH + 'resource radius_global default'
+ on(agent, cmd_str)
+ output = stdout
+ search_pattern_in_output(output, { 'key' => add_quotes('44444444') },
+ false, self, logger)
+ search_pattern_in_output(output, { 'key_format' => '7' },
+ false, self, logger)
+ search_pattern_in_output(output, { 'retransmit_count' => '4' },
+ false, self, logger)
+ search_pattern_in_output(output, { 'source_interface' => "['loopback0']" },
+ false, self, logger)
+ search_pattern_in_output(output, { 'timeout' => '2' },
+ false, self, logger)
+
+ logger.info("Check radius_global resource presence on agent :: #{result}")
+ end
+
+ # @step [Step] Requests manifest from the master server to the agent.
+ step 'TestStep :: Get resource present (with changes)manifest from master' do
+ # Expected exit_code is 0 since this is a bash shell cmd.
+ on(master, RadiusGlobalLib.create_radius_global_manifest_change)
+
+ # Expected exit_code is 2 since this is a puppet agent cmd with change.
+ cmd_str = PUPPET_BINPATH + 'agent -t'
+ on(agent, cmd_str, acceptable_exit_codes: [2])
+
+ logger.info("Get resource present manifest from master :: #{result}")
+ end
+
+ # @step [Step] Checks radius_global resource on agent using resource cmd.
+ step 'TestStep :: Check radius_global resource presence on agent' do
+ # Expected exit_code is 0 since this is a puppet resource cmd.
+ # Flag is set to false to check for presence of RegExp pattern in stdout.
+ cmd_str = PUPPET_BINPATH + 'resource radius_global default'
+ on(agent, cmd_str)
+ output = stdout
+ search_pattern_in_output(output, { 'key' => add_quotes('55555555') },
+ false, self, logger)
+ search_pattern_in_output(output, { 'key_format' => '7' },
+ false, self, logger)
+ search_pattern_in_output(output, { 'retransmit_count' => '2' },
+ false, self, logger)
+ search_pattern_in_output(output, { 'source_interface' => "['loopback1']" },
+ false, self, logger)
+ search_pattern_in_output(output, { 'timeout' => '2' },
+ false, self, logger)
+
+ logger.info("Check radius_global resource presence on agent :: #{result}")
+ end
+
+ # @step [Step] Requests manifest from the master server to the agent.
+ step 'TestStep :: Get resource present (with changes)manifest from master' do
+ # Expected exit_code is 0 since this is a bash shell cmd.
+ on(master, RadiusGlobalLib.create_radius_global_default)
+
+ # Expected exit_code is 2 since this is a puppet agent cmd with change.
+ cmd_str = PUPPET_BINPATH + 'agent -t'
+ on(agent, cmd_str, acceptable_exit_codes: [2])
+
+ logger.info("Get resource present manifest from master :: #{result}")
+ end
+
+ # @step [Step] Checks radius_global resource on agent using resource cmd.
+ step 'TestStep :: Check radius_global resource presence on agent' do
+ # Expected exit_code is 0 since this is a puppet resource cmd.
+ # Flag is set to false to check for presence of RegExp pattern in stdout.
+ cmd_str = PUPPET_BINPATH + 'resource radius_global default'
+ on(agent, cmd_str)
+ output = stdout
+ search_pattern_in_output(output, { 'key' => 'unset' },
+ false, self, logger)
+ search_pattern_in_output(output, { 'retransmit_count' => '1' },
+ false, self, logger)
+ search_pattern_in_output(output, { 'source_interface' => "['unset']" },
+ false, self, logger)
+ search_pattern_in_output(output, { 'timeout' => '5' },
+ false, self, logger)
+
+ logger.info("Check radius_global resource presence on agent :: #{result}")
+ end
+
+ # @raise [PassTest/FailTest] Raises PassTest/FailTest exception using result.
+ raise_passfail_exception(result, testheader, self, logger)
+end
+
+logger.info("TestCase :: #{testheader} :: End")
diff --git a/tests/beaker_tests/radius_global/radius_globallib.rb b/tests/beaker_tests/radius_global/radius_globallib.rb
index 77df16215..5a55e09f5 100644
--- a/tests/beaker_tests/radius_global/radius_globallib.rb
+++ b/tests/beaker_tests/radius_global/radius_globallib.rb
@@ -40,35 +40,35 @@ module RadiusGlobalLib
# A. Methods to create manifests for radius_global Puppet provider test cases.
- # Method to create a manifest for radius_global
+ # Method to create a default manifest for radius_global
# @param none [None] No input parameters exist.
# @result none [None] Returns no object.
- def self.create_radius_global_manifest
+ def self.create_radius_global_default
manifest_str = "cat <#{PUPPETMASTER_MANIFESTPATH}
node default {
radius_global { 'default':
- key => '44444444',
- key_format => '7',
- retransmit_count => '4',
- timeout => '2',
+ key => 'unset',
+ retransmit_count => '1',
+ source_interface => 'unset',
+ timeout => '5',
}
}
EOF"
manifest_str
end
- # Method to create a manifest for radius_global resource
- # with a few changes made from above.
+ # Method to create a manifest for radius_global
# @param none [None] No input parameters exist.
# @result none [None] Returns no object.
- def self.create_radius_global_manifest_change
+ def self.create_radius_global_manifest
manifest_str = "cat <#{PUPPETMASTER_MANIFESTPATH}
node default {
radius_global { 'default':
key => '44444444',
key_format => '7',
- retransmit_count => '3',
- timeout => '1',
+ retransmit_count => '4',
+ source_interface => 'loopback0',
+ timeout => '2',
}
}
EOF"
@@ -76,14 +76,18 @@ def self.create_radius_global_manifest_change
end
# Method to create a manifest for radius_global resource
- # with a few properties removed made from above.
+ # with a few changes made from above.
# @param none [None] No input parameters exist.
# @result none [None] Returns no object.
- def self.create_radius_global_manifest_change_removed
+ def self.create_radius_global_manifest_change
manifest_str = "cat <#{PUPPETMASTER_MANIFESTPATH}
node default {
radius_global { 'default':
- key => 'unset',
+ key => '55555555',
+ key_format => '7',
+ retransmit_count => '2',
+ source_interface => 'loopback1',
+ timeout => '2',
}
}
EOF"
diff --git a/tests/beaker_tests/syslog_server/syslog_server_provider_defaults.rb b/tests/beaker_tests/syslog_server/syslog_server_provider_defaults.rb
index 0587c3dfe..88bdde961 100644
--- a/tests/beaker_tests/syslog_server/syslog_server_provider_defaults.rb
+++ b/tests/beaker_tests/syslog_server/syslog_server_provider_defaults.rb
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2014-2015 Cisco and/or its affiliates.
+# Copyright (c) 2014-2017 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -90,6 +90,8 @@
false, self, logger)
search_pattern_in_output(stdout, { 'severity_level' => '2' },
false, self, logger)
+ search_pattern_in_output(stdout, { 'port' => '5555' },
+ false, self, logger)
search_pattern_in_output(stdout, { 'vrf' => 'default' },
false, self, logger)
end
@@ -144,6 +146,8 @@
false, self, logger)
search_pattern_in_output(stdout, { 'severity_level' => '2' },
false, self, logger)
+ search_pattern_in_output(stdout, { 'port' => '5555' },
+ false, self, logger)
search_pattern_in_output(stdout, { 'vrf' => 'default' },
false, self, logger)
end
diff --git a/tests/beaker_tests/syslog_server/syslog_serverlib.rb b/tests/beaker_tests/syslog_server/syslog_serverlib.rb
index 9a0f1e70a..356ae5fe1 100644
--- a/tests/beaker_tests/syslog_server/syslog_serverlib.rb
+++ b/tests/beaker_tests/syslog_server/syslog_serverlib.rb
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2014-2015 Cisco and/or its affiliates.
+# Copyright (c) 2014-2017 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -50,6 +50,7 @@ def self.create_syslog_server_manifest_present
syslog_server {'1.2.3.4':
ensure => present,
severity_level => 2,
+ port => 5555,
vrf => 'default',
}
}
@@ -84,6 +85,7 @@ def self.create_syslog_server_manifest_present_ipv6
syslog_server {'2003::3':
ensure => present,
severity_level => 2,
+ port => 5555,
vrf => 'default',
}
}
diff --git a/tests/beaker_tests/syslog_settings/syslog_settings_provider_defaults.rb b/tests/beaker_tests/syslog_settings/syslog_settings_provider_defaults.rb
index 71d785b9d..f6a9af0e8 100644
--- a/tests/beaker_tests/syslog_settings/syslog_settings_provider_defaults.rb
+++ b/tests/beaker_tests/syslog_settings/syslog_settings_provider_defaults.rb
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2014-2015 Cisco and/or its affiliates.
+# Copyright (c) 2014-2017 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -29,12 +29,12 @@
#
# TestCase:
# ---------
-# This is a syslog_settings resource test that tests for default value for
-# 'ensure' attribute of a syslog_settings resource.
+# This is a syslog_settings resource test that tests for default values for the
+# syslog_settings resource.
#
# There are 2 sections to the testcase: Setup, group of teststeps.
# The 1st step is the Setup teststep that cleans up the switch state.
-# Steps 2-4 deal with cisco_snmp_group_resource and its
+# Steps 2+ deal with syslog_settings and its
# verification using Puppet Agent and the switch running-config.
#
# The testcode checks for exit_codes from Puppet Agent, Vegas shell and
@@ -64,52 +64,14 @@
# @step [Step] Sets up switch for provider test.
step 'TestStep :: Setup switch for provider' do
- # For deterministic results, make sure syslog_settings is set to
- # seconds.
- on(master, SyslogSettingLib.create_syslog_settings_manifest_seconds)
+ # For deterministic results, make sure syslog_settings is set to defaults.
+ on(master, SyslogSettingLib.create_syslog_settings_manifest_default)
cmd_str = PUPPET_BINPATH + 'agent -t'
on(agent, cmd_str, acceptable_exit_codes: [0, 2])
logger.info('Setup switch for provider')
end
- # @step [Step] Requests manifest from the master server to the agent.
- step 'TestStep :: Get resource present manifest from master' do
- # Expected exit_code is 0 since this is a bash shell cmd.
- on(master, SyslogSettingLib.create_syslog_settings_manifest_milliseconds)
-
- # Expected exit_code is 2 since this is a puppet agent cmd with change.
- cmd_str = PUPPET_BINPATH + 'agent -t'
- on(agent, cmd_str, acceptable_exit_codes: [2])
-
- logger.info("Get resource present manifest from master :: #{result}")
- end
-
- # @step [Step] Checks syslog_settings resource on agent using resource cmd.
- step 'TestStep :: Check syslog_settings resource presence on agent' do
- # Expected exit_code is 0 since this is a puppet resource cmd.
- # Flag is set to false to check for presence of RegExp pattern in stdout.
- cmd_str = PUPPET_BINPATH + 'resource syslog_settings default'
- on(agent, cmd_str) do
- search_pattern_in_output(stdout, { 'time_stamp_units' => 'milliseconds' },
- false, self, logger)
- end
-
- logger.info("Check syslog_settings resource presence on agent :: #{result}")
- end
-
- # @step [Step] Requests manifest from the master server to the agent.
- step 'TestStep :: Get resource present manifest from master' do
- # Expected exit_code is 0 since this is a bash shell cmd.
- on(master, SyslogSettingLib.create_syslog_settings_manifest_seconds)
-
- # Expected exit_code is 2 since this is a puppet agent cmd with change.
- cmd_str = PUPPET_BINPATH + 'agent -t'
- on(agent, cmd_str, acceptable_exit_codes: [2])
-
- logger.info("Get resource present manifest from master :: #{result}")
- end
-
# @step [Step] Checks syslog_settings resource on agent using resource cmd.
step 'TestStep :: Check syslog_settings resource presence on agent' do
# Expected exit_code is 0 since this is a puppet resource cmd.
diff --git a/tests/beaker_tests/syslog_settings/syslog_settings_provider_nondefaults.rb b/tests/beaker_tests/syslog_settings/syslog_settings_provider_nondefaults.rb
new file mode 100644
index 000000000..6471d8fdb
--- /dev/null
+++ b/tests/beaker_tests/syslog_settings/syslog_settings_provider_nondefaults.rb
@@ -0,0 +1,150 @@
+###############################################################################
+# Copyright (c) 2014-2017 Cisco and/or its affiliates.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###############################################################################
+# TestCase Name:
+# -------------
+# SyslogSetting-Provider-NonDefaults.rb
+#
+# TestCase Prerequisites:
+# -----------------------
+# This is a syslog_settings resource testcase for Puppet Agent on Nexus devices.
+# The test case assumes the following prerequisites are already satisfied:
+# A. Populating the HOSTS configuration file with the agent and master
+# information.
+# B. Enabling SSH connection prerequisites on the N9K switch based Agent.
+# C. Starting of Puppet master server on master.
+# D. Sending to and signing of Puppet agent certificate request on master.
+#
+# TestCase:
+# ---------
+# This is a syslog_settings resource test that tests for nondefault values for
+# the syslog_settings resource.
+#
+# There are 2 sections to the testcase: Setup, group of teststeps.
+# The 1st step is the Setup teststep that cleans up the switch state.
+# Steps 2+ deal with syslog_settings and its
+# verification using Puppet Agent and the switch running-config.
+#
+# The testcode checks for exit_codes from Puppet Agent, Vegas shell and
+# Bash shell command executions. For Vegas shell and Bash shell command
+# string executions, this is the exit_code convention:
+# 0 - successful command execution, > 0 - failed command execution.
+# For Puppet Agent command string executions, this is the exit_code convention:
+# 0 - no changes have occurred, 1 - errors have occurred,
+# 2 - changes have occurred, 4 - failures have occurred and
+# 6 - changes and failures have occurred.
+# 0 is the default exit_code checked in Beaker::DSL::Helpers::on() method.
+# The testcode also uses RegExp pattern matching on stdout or output IO
+# instance attributes of Result object from on() method invocation.
+#
+###############################################################################
+
+# Require UtilityLib.rb and SnmpGroupLib.rb paths.
+require File.expand_path('../../lib/utilitylib.rb', __FILE__)
+require File.expand_path('../syslog_settingslib.rb', __FILE__)
+
+result = 'PASS'
+testheader = 'syslog_settings Resource :: All Attributes Non-Defaults'
+
+tests = {
+ agent: agent,
+ master: master,
+ intf_type: 'mgmt',
+ resource_name: 'syslog_settings',
+}
+
+# @test_name [TestCase] Executes defaults testcase for syslog_settings Resource.
+test_name "TestCase :: #{testheader}" do
+ raise_skip_exception('Not supported on IOS XR', self) if operating_system == 'ios_xr'
+ # Find an available test interface on this device
+ intf = find_interface(tests)
+
+ # @step [Step] Sets up switch for provider test.
+ step 'TestStep :: Setup switch for provider' do
+ # For deterministic results, make sure syslog_settings is set to defaults.
+ on(master, SyslogSettingLib.create_syslog_settings_manifest_default)
+ cmd_str = PUPPET_BINPATH + 'agent -t'
+ on(agent, cmd_str, acceptable_exit_codes: [0, 2])
+
+ logger.info('Setup switch for provider')
+ end
+
+ # @step [Step] Requests manifest from the master server to the agent.
+ step 'TestStep :: Get resource non-default manifest from master' do
+ # Expected exit_code is 0 since this is a bash shell cmd.
+ on(master, SyslogSettingLib.create_syslog_settings_manifest_nondefault(intf))
+
+ # Expected exit_code is 2 since this is a puppet agent cmd with change.
+ cmd_str = PUPPET_BINPATH + 'agent -t'
+ on(agent, cmd_str, acceptable_exit_codes: [2])
+
+ logger.info("Get resource non-default manifest from master :: #{result}")
+ end
+
+ # @step [Step] Checks syslog_settings resource on agent using resource cmd.
+ step 'TestStep :: Check syslog_settings non-default on agent' do
+ # Expected exit_code is 0 since this is a puppet resource cmd.
+ # Flag is set to false to check for presence of RegExp pattern in stdout.
+ cmd_str = PUPPET_BINPATH + 'resource syslog_settings default'
+ on(agent, cmd_str) do
+ search_pattern_in_output(stdout, { 'console' => '1' },
+ false, self, logger)
+ search_pattern_in_output(stdout, { 'monitor' => '1' },
+ false, self, logger)
+ search_pattern_in_output(stdout, { 'source_interface' => "['#{intf}']" },
+ false, self, logger)
+ search_pattern_in_output(stdout, { 'time_stamp_units' => 'milliseconds' },
+ false, self, logger)
+ end
+
+ logger.info("Check syslog_settings non-default on agent :: #{result}")
+ end
+
+ # @step [Step] Requests manifest from the master server to the agent.
+ step 'TestStep :: Get resource unset manifest from master' do
+ # Expected exit_code is 0 since this is a bash shell cmd.
+ on(master, SyslogSettingLib.create_syslog_settings_manifest_unset)
+
+ # Expected exit_code is 2 since this is a puppet agent cmd with change.
+ cmd_str = PUPPET_BINPATH + 'agent -t'
+ on(agent, cmd_str, acceptable_exit_codes: [2])
+
+ logger.info("Get resource non-default manifest from master :: #{result}")
+ end
+
+ # @step [Step] Checks syslog_settings resource on agent using resource cmd.
+ step 'TestStep :: Check syslog_settings unset on agent' do
+ # Expected exit_code is 0 since this is a puppet resource cmd.
+ # Flag is set to false to check for presence of RegExp pattern in stdout.
+ cmd_str = PUPPET_BINPATH + 'resource syslog_settings default'
+ on(agent, cmd_str) do
+ search_pattern_in_output(stdout, { 'console' => 'unset' },
+ false, self, logger)
+ search_pattern_in_output(stdout, { 'monitor' => 'unset' },
+ false, self, logger)
+ search_pattern_in_output(stdout, { 'source_interface' => "['unset']" },
+ false, self, logger)
+ search_pattern_in_output(stdout, { 'time_stamp_units' => 'seconds' },
+ false, self, logger)
+ end
+
+ logger.info("Check syslog_settings unset on agent :: #{result}")
+ end
+
+ # @raise [PassTest/FailTest] Raises PassTest/FailTest exception using result.
+ raise_passfail_exception(result, testheader, self, logger)
+end
+
+logger.info("TestCase :: #{testheader} :: End")
diff --git a/tests/beaker_tests/syslog_settings/syslog_settingslib.rb b/tests/beaker_tests/syslog_settings/syslog_settingslib.rb
index 842a4e026..bd6f6e71a 100644
--- a/tests/beaker_tests/syslog_settings/syslog_settingslib.rb
+++ b/tests/beaker_tests/syslog_settings/syslog_settingslib.rb
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2014-2015 Cisco and/or its affiliates.
+# Copyright (c) 2014-2017 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -40,29 +40,50 @@ module SyslogSettingLib
# A. Methods to create manifests for syslog_setting Puppet provider test cases.
- # Method to create a manifest for syslog_setting resource attribute 'ensure'
- # where 'ensure' is set to present.
+ # Method to create a manifest for syslog_setting with default attributes
# @param none [None] No input parameters exist.
# @result none [None] Returns no object.
- def self.create_syslog_settings_manifest_milliseconds
+ def self.create_syslog_settings_manifest_default
manifest_str = "cat <#{PUPPETMASTER_MANIFESTPATH}
node default {
- syslog_settings {'default':
- time_stamp_units => 'milliseconds',
- }
+ syslog_settings {'default':
+ console => '2',
+ monitor => '5',
+ source_interface => 'unset',
+ time_stamp_units => 'seconds',
+ }
+}
+EOF"
+ manifest_str
+ end
+
+ # Method to create a manifest for syslog_setting with non-default attributes
+ # @param intf [String] source_interface
+ # @result none [None] Returns no object.
+ def self.create_syslog_settings_manifest_nondefault(intf)
+ manifest_str = "cat <#{PUPPETMASTER_MANIFESTPATH}
+node default {
+ syslog_settings {'default':
+ console => '1',
+ monitor => '1',
+ source_interface => '#{intf}',
+ time_stamp_units => 'milliseconds',
+ }
}
EOF"
manifest_str
end
- # Method to create a manifest for syslog_setting resource attribute 'ensure'
- # where 'ensure' is set to absent.
+ # Method to create a manifest for syslog_setting with unset attributes
# @param none [None] No input parameters exist.
# @result none [None] Returns no object.
- def self.create_syslog_settings_manifest_seconds
+ def self.create_syslog_settings_manifest_unset
manifest_str = "cat <#{PUPPETMASTER_MANIFESTPATH}
node default {
syslog_settings {'default':
+ console => 'unset',
+ monitor => 'unset',
+ source_interface => 'unset',
time_stamp_units => 'seconds',
}
}
diff --git a/tests/beaker_tests/tacacs_global/tacacs_global_provider_defaults.rb b/tests/beaker_tests/tacacs_global/tacacs_global_provider_defaults.rb
index 4acdfef1d..f49df80f0 100644
--- a/tests/beaker_tests/tacacs_global/tacacs_global_provider_defaults.rb
+++ b/tests/beaker_tests/tacacs_global/tacacs_global_provider_defaults.rb
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2014-2015 Cisco and/or its affiliates.
+# Copyright (c) 2014-2017 Cisco and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -29,12 +29,12 @@
#
# TestCase:
# ---------
-# This is a tacacs_global resource test that tests for default value for
-# 'ensure' attribute of a tacacs_global resource.
+# This is a tacacs_global resource test that tests default attribute of
+# tacacs_global resource.
#
# There are 2 sections to the testcase: Setup, group of teststeps.
# The 1st step is the Setup teststep that cleans up the switch state.
-# Steps 2-4 deal with cisco_snmp_group_resource and its
+# Steps 2+ deal with tacacs_global and its
# verification using Puppet Agent and the switch running-config.
#
# The testcode checks for exit_codes from Puppet Agent, Vegas shell and
@@ -58,45 +58,40 @@
result = 'PASS'
testheader = 'tacacs_global Resource :: All Attributes Defaults'
+def cleanup
+ logger.info('Testcase Cleanup:')
+ command_config(agent, 'no feature tacacs+')
+end
+
# @test_name [TestCase] Executes defaults testcase for tacacs_global Resource.
test_name "TestCase :: #{testheader}" do
- # @step [Step] Requests manifest from the master server to the agent.
- step 'TestStep :: Get resource present manifest from master' do
- # Expected exit_code is 0 since this is a bash shell cmd.
- on(master, TacacsGlobalLib.create_tacacs_global_manifest)
-
- # Expected exit_code is 0 or 2 depending on the state of the device.
- cmd_str = PUPPET_BINPATH + 'agent -t'
- on(agent, cmd_str, acceptable_exit_codes: [0, 2])
-
- logger.info("Get resource present manifest from master :: #{result}")
- end
+ cleanup
+ teardown { cleanup }
# @step [Step] Checks tacacs_global resource on agent using resource cmd.
- step 'TestStep :: Check tacacs_global resource presence on agent' do
+ step 'TestStep :: Check tacacs_global resource unconfigured' do
# Expected exit_code is 0 since this is a puppet resource cmd.
# Flag is set to false to check for presence of RegExp pattern in stdout.
cmd_str = PUPPET_BINPATH + 'resource tacacs_global default'
on(agent, cmd_str)
output = stdout
- search_pattern_in_output(output, { 'key' => add_quotes('44444444') },
- false, self, logger)
- search_pattern_in_output(output, { 'key_format' => '7' },
+ search_pattern_in_output(output, { 'key' => 'unset' },
false, self, logger)
- search_pattern_in_output(output, { 'timeout' => '2' },
+ search_pattern_in_output(output, { 'source_interface' => "['unset']" },
false, self, logger)
+ search_pattern_in_output(output, [/timeout/], true, self, logger)
- logger.info("Check tacacs_global resource presence on agent :: #{result}")
+ logger.info("Check tacacs_global resource unconfigured :: #{result}")
end
# @step [Step] Requests manifest from the master server to the agent.
- step 'TestStep :: Get resource present (with changes) manifest from master' do
+ step 'TestStep :: Get resource present manifest from master' do
# Expected exit_code is 0 since this is a bash shell cmd.
- on(master, TacacsGlobalLib.create_tacacs_global_manifest_change)
+ on(master, TacacsGlobalLib.create_tacacs_global_default)
- # Expected exit_code is 2 since this is a puppet agent cmd with change.
+ # Expected exit_code is 0 or 2 depending on the state of the device.
cmd_str = PUPPET_BINPATH + 'agent -t'
- on(agent, cmd_str, acceptable_exit_codes: [2])
+ on(agent, cmd_str, acceptable_exit_codes: [0, 2])
logger.info("Get resource present manifest from master :: #{result}")
end
@@ -108,11 +103,11 @@
cmd_str = PUPPET_BINPATH + 'resource tacacs_global default'
on(agent, cmd_str)
output = stdout
- search_pattern_in_output(output, { 'key' => add_quotes('44444444') },
+ search_pattern_in_output(output, { 'key' => 'unset' },
false, self, logger)
- search_pattern_in_output(output, { 'key_format' => '7' },
+ search_pattern_in_output(output, { 'timeout' => '5' },
false, self, logger)
- search_pattern_in_output(output, { 'timeout' => '1' },
+ search_pattern_in_output(output, { 'source_interface' => "['unset']" },
false, self, logger)
logger.info("Check tacacs_global resource presence on agent :: #{result}")
diff --git a/tests/beaker_tests/tacacs_global/tacacs_global_provider_nondefaults.rb b/tests/beaker_tests/tacacs_global/tacacs_global_provider_nondefaults.rb
new file mode 100644
index 000000000..051e68ffc
--- /dev/null
+++ b/tests/beaker_tests/tacacs_global/tacacs_global_provider_nondefaults.rb
@@ -0,0 +1,145 @@
+###############################################################################
+# Copyright (c) 2014-2017 Cisco and/or its affiliates.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###############################################################################
+# TestCase Name:
+# -------------
+# TacacsGlobal-Provider-NonDefaults.rb
+#
+# TestCase Prerequisites:
+# -----------------------
+# This is a tacacs_global resource testcase for Puppet Agent on Nexus devices.
+# The test case assumes the following prerequisites are already satisfied:
+# A. Populating the HOSTS configuration file with the agent and master
+# information.
+# B. Enabling SSH connection prerequisites on the N9K switch based Agent.
+# C. Starting of Puppet master server on master.
+# D. Sending to and signing of Puppet agent certificate request on master.
+#
+# TestCase:
+# ---------
+# This is a tacacs_global resource test that tests non-default attribute of
+# tacacs_global resource.
+#
+# There are 2 sections to the testcase: Setup, group of teststeps.
+# The 1st step is the Setup teststep that cleans up the switch state.
+# Steps 2+ deal with tacacs_global and its
+# verification using Puppet Agent and the switch running-config.
+#
+# The testcode checks for exit_codes from Puppet Agent, Vegas shell and
+# Bash shell command executions. For Vegas shell and Bash shell command
+# string executions, this is the exit_code convention:
+# 0 - successful command execution, > 0 - failed command execution.
+# For Puppet Agent command string executions, this is the exit_code convention:
+# 0 - no changes have occurred, 1 - errors have occurred,
+# 2 - changes have occurred, 4 - failures have occurred and
+# 6 - changes and failures have occurred.
+# 0 is the default exit_code checked in Beaker::DSL::Helpers::on() method.
+# The testcode also uses RegExp pattern matching on stdout or output IO
+# instance attributes of Result object from on() method invocation.
+#
+###############################################################################
+
+# Require UtilityLib.rb and SnmpGroupLib.rb paths.
+require File.expand_path('../../lib/utilitylib.rb', __FILE__)
+require File.expand_path('../tacacs_globallib.rb', __FILE__)
+
+result = 'PASS'
+testheader = 'tacacs_global Resource :: All Attributes Non-Defaults'
+
+tests = {
+ agent: agent,
+ master: master,
+ intf_type: 'ethernet',
+ resource_name: 'tacacs_global',
+}
+
+def cleanup
+ logger.info('Testcase Cleanup:')
+ command_config(agent, 'no feature tacacs+')
+end
+
+# @test_name [TestCase] Executes defaults testcase for tacacs_global Resource.
+test_name "TestCase :: #{testheader}" do
+ cleanup
+ teardown { cleanup }
+
+ # Find an available test interface on this device
+ intf = find_interface(tests)
+
+ # @step [Step] Requests manifest from the master server to the agent.
+ step 'TestStep :: Get resource present (with changes) manifest from master' do
+ # Expected exit_code is 0 since this is a bash shell cmd.
+ on(master, TacacsGlobalLib.create_tacacs_global_non_default(intf))
+
+ # Expected exit_code is 2 since this is a puppet agent cmd with change.
+ cmd_str = PUPPET_BINPATH + 'agent -t'
+ on(agent, cmd_str, acceptable_exit_codes: [2])
+
+ logger.info("Get resource present manifest from master :: #{result}")
+ end
+
+ # @step [Step] Checks tacacs_global resource on agent using resource cmd.
+ step 'TestStep :: Check tacacs_global resource presence on agent' do
+ # Expected exit_code is 0 since this is a puppet resource cmd.
+ # Flag is set to false to check for presence of RegExp pattern in stdout.
+ cmd_str = PUPPET_BINPATH + 'resource tacacs_global default'
+ on(agent, cmd_str)
+ output = stdout
+ search_pattern_in_output(output, { 'key' => add_quotes('44444444') },
+ false, self, logger)
+ search_pattern_in_output(output, { 'key_format' => '7' },
+ false, self, logger)
+ search_pattern_in_output(output, { 'source_interface' => "['#{intf}']" },
+ false, self, logger)
+ search_pattern_in_output(output, { 'timeout' => '1' },
+ false, self, logger)
+
+ logger.info("Check tacacs_global resource presence on agent :: #{result}")
+ end
+
+ # @step [Step] Requests manifest from the master server to the agent.
+ step 'TestStep :: Get resource present manifest from master' do
+ # Expected exit_code is 0 since this is a bash shell cmd.
+ on(master, TacacsGlobalLib.create_tacacs_global_default)
+
+ # Expected exit_code is 0 or 2 depending on the state of the device.
+ cmd_str = PUPPET_BINPATH + 'agent -t'
+ on(agent, cmd_str, acceptable_exit_codes: [0, 2])
+
+ logger.info("Get resource present manifest from master :: #{result}")
+ end
+
+ # @step [Step] Checks tacacs_global resource on agent using resource cmd.
+ step 'TestStep :: Check tacacs_global resource presence on agent' do
+ # Expected exit_code is 0 since this is a puppet resource cmd.
+ # Flag is set to false to check for presence of RegExp pattern in stdout.
+ cmd_str = PUPPET_BINPATH + 'resource tacacs_global default'
+ on(agent, cmd_str)
+ output = stdout
+ search_pattern_in_output(output, { 'key' => 'unset' },
+ false, self, logger)
+ search_pattern_in_output(output, { 'timeout' => '5' },
+ false, self, logger)
+ search_pattern_in_output(output, { 'source_interface' => "['unset']" },
+ false, self, logger)
+
+ logger.info("Check tacacs_global resource presence on agent :: #{result}")
+ end
+
+ # @raise [PassTest/FailTest] Raises PassTest/FailTest exception using result.
+ raise_passfail_exception(result, testheader, self, logger)
+end
+
+logger.info("TestCase :: #{testheader} :: End")
diff --git a/tests/beaker_tests/tacacs_global/tacacs_globallib.rb b/tests/beaker_tests/tacacs_global/tacacs_globallib.rb
index 56e9073e0..4d1a63c65 100644
--- a/tests/beaker_tests/tacacs_global/tacacs_globallib.rb
+++ b/tests/beaker_tests/tacacs_global/tacacs_globallib.rb
@@ -43,13 +43,13 @@ module TacacsGlobalLib
# Method to create a manifest for tacacs_global
# @param none [None] No input parameters exist.
# @result none [None] Returns no object.
- def self.create_tacacs_global_manifest
+ def self.create_tacacs_global_default
manifest_str = "cat <#{PUPPETMASTER_MANIFESTPATH}
node default {
tacacs_global { 'default':
- key => '44444444',
- key_format => '7',
- timeout => '2',
+ key => 'unset',
+ source_interface => 'unset',
+ timeout => '5',
}
}
EOF"
@@ -58,14 +58,15 @@ def self.create_tacacs_global_manifest
# Method to create a manifest for tacacs_global resource
# with a few changes made from above.
- # @param none [None] No input parameters exist.
+ # @param intf [String] source_interface
# @result none [None] Returns no object.
- def self.create_tacacs_global_manifest_change
+ def self.create_tacacs_global_non_default(intf)
manifest_str = "cat <#{PUPPETMASTER_MANIFESTPATH}
node default {
tacacs_global { 'default':
key => '44444444',
key_format => '7',
+ source_interface => '#{intf}',
timeout => '1',
}
}