vxlan 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@ module Vxlan
14
14
  def call(address_family: "ipv4")
15
15
  raise ArgumentError, "Unsupported address family" unless %w[ipv4 ipv6].include?(address_family)
16
16
 
17
- bindings = route_map_bindings.transform_values(&:uniq)
17
+ consumers_by_route_map = route_map_consumers.transform_values(&:uniq)
18
18
  references = @configuration.fetch(:route_maps).each_with_object({}) do |(name, entries), result|
19
19
  entries.sort_by { |entry| entry.fetch(:sequence) }.each do |entry|
20
20
  matches = entry.fetch(:prefix_list_matches) do
@@ -22,7 +22,7 @@ module Vxlan
22
22
  end
23
23
  matches.select { |match| match[:address_family] == address_family }.each do |match|
24
24
  route_map_reference = { type: "route_map", name: name, sequence: entry.fetch(:sequence), action: entry.fetch(:action),
25
- bindings: bindings.fetch(name, []).dup }
25
+ bindings: consumers_by_route_map.fetch(name, []).dup }
26
26
  route_map_reference[:selector] = match[:selector] unless match[:selector] == "address"
27
27
  match.fetch(:names).uniq.each do |prefix_list|
28
28
  (result[prefix_list] ||= []) << route_map_reference
@@ -37,7 +37,7 @@ module Vxlan
37
37
  private
38
38
 
39
39
  # 关联关系保留协议、VRF、地址族及对等体,避免共享策略被混用。
40
- def route_map_bindings
40
+ def route_map_consumers
41
41
  result = Hash.new { |hash, key| hash[key] = [] }
42
42
  bgp = @configuration.fetch(:bgp)
43
43
  { "default" => bgp }.merge(bgp.fetch(:vrfs, {})).each do |vrf, settings|
data/lib/vxlan/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Vxlan
4
4
  # 公开包版本,供 RubyGems 元数据和运行时调用方共用。
5
- VERSION = "0.2.1"
5
+ VERSION = "0.2.2"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vxlan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gatework contributors
@@ -81,6 +81,7 @@ files:
81
81
  - lib/vxlan.rb
82
82
  - lib/vxlan/bgp_neighbors.rb
83
83
  - lib/vxlan/cisco_nxos/configuration.rb
84
+ - lib/vxlan/cisco_nxos/configuration_state.rb
84
85
  - lib/vxlan/cisco_nxos/document.rb
85
86
  - lib/vxlan/cisco_nxos/evpn_l2route.rb
86
87
  - lib/vxlan/cisco_nxos/parser.rb