Skip to content

Commit

Permalink
Merge pull request #485 from cisco/release_1.9.0
Browse files Browse the repository at this point in the history
Release 1.9.0
  • Loading branch information
mikewiebe authored Apr 19, 2018
2 parents b08d3d6 + 7602522 commit 5009101
Show file tree
Hide file tree
Showing 45 changed files with 2,074 additions and 158 deletions.
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,36 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [1.9.0] - 2018-04-19

### New feature support
#### Cisco Resources
- `cisco_evpn_multisite` type and provider.
- `cisco_evpn_stormcontrol` type and provider.
- `cisco_interface_evpn_multisite` type and provider.
- `cisco_evpn_multicast` type and provider.
- `cisco_ip_multicast` type and provider

### Added
- Extend `cisco_bgp_neighbor` with attribute:
- `peer_type`
- Extend `cisco_bgp_neighbor_af` with attribute:
- `rewrite_evpn_rt_asn`
- Extend `cisco_vxlan_vtep` with attribute:
- `multisite_border_gateway_interface`
- Extend `cisco_vxlan_vtep_vni` with attribute:
- `multisite_ingress_replication`
- Extend `cisco_vrf_af` with attributes:
- `route_target_both_auto_mvpn`
- `route_target_import_mvpn`
- `route_target_export_mvpn`

### Changed

### Removed

### Resolved Issues

## [1.8.0] - 2017-12-12

### New feature support
Expand Down Expand Up @@ -441,6 +471,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.9.0]: https://github.com/cisco/cisco-network-puppet-module/compare/v1.8.0...v1.9.0
[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
Expand Down
484 changes: 348 additions & 136 deletions README.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/README-agent-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ Puppet Enterprise 2015.2 |

Supported Platforms | OS | OS Version |
:-------------------|-------|----------------------|
Cisco Nexus N9k <br>*[How to get a virtual Nexus N9k](#VIRT_9K)* | NX-OS | 7.0(3)I2(1) and later
Cisco Nexus N3k | NX-OS | 7.0(3)I2(1) and later
Cisco Nexus N9k <br>*[How to get a virtual Nexus N9k](#VIRT_9K)* | NX-OS | 7.0(3)I2(5) and later
Cisco Nexus N3k | NX-OS | 7.0(3)I2(5) and later
Cisco Nexus N5k | NX-OS | 7.3(0)N1(1) and later
Cisco Nexus N6k | NX-OS | 7.3(0)N1(1) and later
Cisco Nexus N7k | NX-OS | 7.3(0)D1(1) and later
Expand Down Expand Up @@ -536,7 +536,7 @@ A virtual Nexus N9k may be helpful for development and testing. To obtain a virt
## License

~~~
Copyright (c) 2014-2017 Cisco and/or its affiliates.
Copyright (c) 2014-2018 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.
Expand Down
8 changes: 7 additions & 1 deletion docs/README-maintainers.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ When we are considering publishing a new release, all of the following steps mus
* Fix All Bugs.
* Make sure proper test case skips are in place for unsupported platforms.
* Ensure that tests have been executed against released Gem versions (release a new version if necessary!) and do not have dependencies on unreleased Gem code.

* Make sure to update [test_package_patch.rb](../tests/beaker_tests/file_service_package/test_package_patch.rb) for all versions that need to be validated.
```diff
+when /7.0.3.I7.3/
+ name = 'nxos.sample-n9k_ALL'
+ filename = 'nxos.sample-n9k_ALL-1.0.0-7.0.3.I7.3.lib32_n9000.rpm'
+ version = '1.0.0-7.0.3.I7.3'
```

1. Update [changelog.](https://github.com/cisco/cisco-network-puppet-module/blob/develop/CHANGELOG.md)
* Make sure CHANGELOG.md accurately reflects all changes since the last release.
Expand Down
39 changes: 39 additions & 0 deletions examples/cisco/demo_evpn_multisite.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Manifest to demo evpn_multisite 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_evpn_multisite {

if platform_get() =~ /n9k-ex/ {

cisco_evpn_multisite { '150':
ensure => present,
delay_restore => 50,
}

cisco_evpn_stormcontrol { 'unicast':
ensure => present,
level => 50,
}

cisco_interface_evpn_multisite { 'Ethernet1/1':
ensure => present,
tracking => 'dci-tracking',
}

} else {
notify{'SKIP: This platform does not support cisco_evpn_multisite': }
}
}
64 changes: 64 additions & 0 deletions examples/cisco/demo_trm.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Manifest to demo TRM providers
#
# Copyright (c) 2018 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_trm {

if platform_get() =~ /n9k(-ex)?$/ {

if image_supports_trm() {

$mvpn_support = prop_supported('route_target_import_mvpn')

$rt_both_mvpn = $mvpn_support ? {
true => true,
default => undef
}

$rt_import_mvpn = $mvpn_support ? {
true => ['12:13', '14:15'],
default => undef
}

$rt_export_mvpn = $mvpn_support ? {
true => ['16:17', '18:19'],
default => undef
}

cisco_evpn_multicast { 'default':
ensure => present,
}

cisco_vrf_af { 'red ipv4 unicast':
ensure => present,
route_policy_export => 'abc',
route_policy_import => 'abc',
route_target_import_mvpn => $rt_import_mvpn,
route_target_export_mvpn => $rt_export_mvpn,
route_target_both_auto_mvpn => $rt_both_mvpn,
}

cisco_ip_multicast { 'default':
ensure => present,
overlay_distributed_dr => 'true',
overlay_spt_only => 'true',
}
} else {
notify{'SKIP: This image does not support TRM': }
}
} else {
notify{'SKIP: This platform does not support TRM': }
}
}
2 changes: 2 additions & 0 deletions examples/demo_all_cisco.pp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
include ciscopuppet::cisco::demo_command_config
include ciscopuppet::cisco::demo_dhcp_relay_global
include ciscopuppet::cisco::demo_evpn
include ciscopuppet::cisco::demo_evpn_multisite
include ciscopuppet::cisco::demo_fabricpath
include ciscopuppet::cisco::demo_hsrp
include ciscopuppet::cisco::demo_interface
Expand All @@ -50,6 +51,7 @@
include ciscopuppet::cisco::demo_stp_vlan
include ciscopuppet::cisco::demo_tacacs_server
include ciscopuppet::cisco::demo_tacacs_server_host
include ciscopuppet::cisco::demo_trm
# include ciscopuppet::cisco::demo_upgrade
include ciscopuppet::cisco::demo_vlan
include ciscopuppet::cisco::demo_vpc_domain
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/feature/cisco_node_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.8.0')
rec_version = Gem::Version.new('1.9.0')
gem_version = Gem::Version.new(CiscoNodeUtils::VERSION)
if gem_version < rec_version
warn "This module works best with version #{rec_version} of gem "\
Expand Down
37 changes: 37 additions & 0 deletions lib/puppet/parser/functions/image_supports_trm.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#
# Cisco image_supports_trm puppet manifest function.
#
# February 2018, Rahul J Shenoy
#
# Copyright (c) 2018 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.

module Puppet
module Parser
# Function platform_fretta.
# Searches facter os.release.full and returns true if the
# version matches the fretta image version.
#
module Functions
newfunction(:image_supports_trm, type: :rvalue) do |_args|
data = lookupvar('os')
return '' if data.nil?

pat = /I[2-6]/
image = data['release']['full']
image[pat].nil? ? true : false
end
end
end
end
2 changes: 2 additions & 0 deletions lib/puppet/parser/functions/platform_get.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ module Functions
cisco_hardware = 'n6k'
when /Nexus\s?7\d\d\d/
cisco_hardware = 'n7k'
when /Nexus\s?9\d+\s\S+-EX/
cisco_hardware = 'n9k-ex'
when /(Nexus\s?9\d\d\d|NX-OSv Chassis)/
if function_platform_fretta([])
cisco_hardware = 'n9k-f'
Expand Down
6 changes: 6 additions & 0 deletions lib/puppet/parser/functions/prop_supported.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ module Functions
:route_target_import_evpn,
:route_target_export_evpn,
]
mvpn = [:route_target_both_auto_mvpn,
:route_target_import_mvpn,
:route_target_export_mvpn,
]
rt = [:route_target_both_auto,
:route_target_import,
:route_target_export,
Expand All @@ -41,6 +45,8 @@ module Functions
:route_distinguisher
return true if plat[/n7k/] && function_find_linecard(['N7K-F3'])
return true if plat[/n9k/]
when *mvpn
return true if plat[/n9k(-ex)?$/]
end
false
end
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/provider/cisco_bgp_neighbor/cisco.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
:timers_holdtime,
:transport_passive_mode,
:update_source,
:peer_type,
]
BGP_NBR_BOOL_PROPS = [
:bfd,
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/provider/cisco_bgp_neighbor_af/cisco.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
:next_hop_third_party,
:route_reflector_client,
:suppress_inactive,
:rewrite_evpn_rt_asn,
]

BGP_NBR_AF_ALL_PROPS = BGP_NBR_AF_NON_BOOL_PROPS + BGP_NBR_AF_BOOL_PROPS
Expand Down
70 changes: 70 additions & 0 deletions lib/puppet/provider/cisco_evpn_multicast/cisco.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# February, 2018
#
# Copyright (c) 2018-2019 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?

Puppet::Type.type(:cisco_evpn_multicast).provide(:cisco) do
desc 'The Cisco provider for cisco evpn multicast'

confine feature: :cisco_node_utils

mk_resource_methods

def initialize(value={})
super(value)
@property_flush = {}
end # initialize

def self.properties_get
new(
ensure: :present,
name: 'default')
end # self.properties_get

def self.instances
inst = []
evpn_multicast = Cisco::EvpnMulticast.multicast
inst << properties_get unless evpn_multicast == ''
inst
end # self.instances

def self.prefetch(resources)
resources.values.first.provider = instances.first unless instances.first.nil?
end

def exists?
@property_hash[:ensure] == :present
end

def create
@property_flush[:ensure] = :present
end

def destroy
@property_flush[:ensure] = :absent
end

def flush
# Create a NU instance to get a handle to use the instance methods
# for ensure => 'present' evpn_multicast is configured
# for ensure => 'absent' the instance is just used to access the
# destroy method
@nu = Cisco::EvpnMulticast.new
return unless @property_flush[:ensure] == :absent
@nu.destroy
@nu = nil
end
end # Puppet::Type
Loading

0 comments on commit 5009101

Please sign in to comment.