-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #485 from cisco/release_1.9.0
Release 1.9.0
- Loading branch information
Showing
45 changed files
with
2,074 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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': } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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': } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.