wireless-rb 0.9.0 → 0.10.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5640ecca07f5a83e8af9dd24801c3ef7c96611429fc0cd07dd0a57afa39fd31e
4
- data.tar.gz: ac325c39f16dd06ea6911e924a373eac80a0b7e690d0facc243146b3887313cc
3
+ metadata.gz: 66b1a0660dbbcabaa575faa0ffb1634f70f832033c0489b3fe67a78c7115d515
4
+ data.tar.gz: c00d2bce82a7e1986a3c481ca2fa98569e8e1fa374a17763d5c752b16f5cc396
5
5
  SHA512:
6
- metadata.gz: 71b06b21ec535371be6f6b531eba0b8bfdaafbfab0741482030f376240ab198dbd35bf10d52aa99cd44fcb79031ae93a3872929c879768b11ef6042143e00bea
7
- data.tar.gz: 5bd14b3f54a4b72bba396b36b520d60b07769605eed80768b5d1245feb0dfdf4f547f4f61399a285771dbcf8557c089284ae067b7f372c3a16bbcb5b6b61ed0d
6
+ metadata.gz: e51be5bd6f8eb9277ed1b2c38b7bb522c60bb1cb483638fc5effcb02cfbbeb9020176d8a8f8a1d9caaa4eecbb1ccdcb15525b9f7a61f1156d4cf8103516fdea5
7
+ data.tar.gz: 382fa4ee70b9d0ffc7210149e24a5d4b2dc5f8baad8332a9fb4443680dc8d1ab6867937768938907192668d5f9a950bcabb84ed450e6c56839632a61159aa010
data/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ Changes to the public contract are recorded here. Versions follow Semantic Versi
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.10.0 (2026-10-30)
8
+
9
+ - Migrate H3C/Huawei profiles and consumers to ctx_parser 0.5 Commands declarations; remove Profile COMMANDS/PARSERS aliases.
10
+ - Require the parser-compatible ctx_driver/ctx_runner patch releases while retaining shared-view and AP collection contracts.
11
+
12
+ - Allow the Ruby 4 / expect-pty 0.10 compatible net-connector 0.22.x alongside 0.21.x for optional collection.
13
+
7
14
  ## 0.9.0 (2026-10-30)
8
15
 
9
16
  - Adopt schema 4 Target/Source contracts, canonical `h3c` identity and shared configuration sessions. AP provenance stores domain metadata under `context`; operational status is `:online`, `:offline` or `:unknown`. Use explicit `channel_width_mhz` and `utilization_percent`. Reuse an immutable duplicate-aware configuration index for change candidates; reject unknown change fields. Require connector 0.21 for collection.
data/README.md CHANGED
@@ -182,3 +182,5 @@ Dynamic inventory uses `Netdisco::Catalog`. Any duplicate row for a selected add
182
182
  ## Domain contract migration (2026-10-30)
183
183
 
184
184
  Adopt schema 4 Target/Source contracts, canonical `h3c` identity and shared configuration sessions. AP provenance stores domain metadata under `context`; operational status is `:online`, `:offline` or `:unknown`. Use explicit `channel_width_mhz` and `utilization_percent`. Reuse an immutable duplicate-aware configuration index for change candidates; reject unknown change fields. Require connector 0.21 for collection. See the [schema 4 migration and module contracts](https://github.com/gatework/ctx_runner/blob/main/docs/contracts-2026-10-30.md). Regenerate old collection reports and change plans; changing only their version number is not supported.
185
+
186
+ Platform profiles use ctx_parser 0.5 `Commands` declarations. Replace `Profile::COMMANDS` / `Profile::PARSERS` with `Profile::DECLARATIONS.by_dimension` / `.parsers`; instance query methods remain available. See the [parser 0.5 migration](https://github.com/gatework/ctx_parser/blob/main/docs/contracts-0.5.md).
@@ -71,7 +71,7 @@ module Wireless
71
71
  # 单个 AP 脚本或解析失败不能丢弃其他 AP 的邻居观测。
72
72
  def read_ap_neighbors(ap_session, ap)
73
73
  stage = :execute
74
- source = { kind: :ap_lldp_result, ap_name: ap[:name], command: H3c::Profile::COMMANDS.fetch(:lldp),
74
+ source = { kind: :ap_lldp_result, ap_name: ap[:name], command: H3c::Profile::DECLARATIONS.by_dimension.fetch(:lldp),
75
75
  attempted: true, status: :failed, neighbor_count: 0 }
76
76
  outcome = ap_session.read(access_point: ap)
77
77
  stage = :response
@@ -5,7 +5,7 @@ require "optparse"
5
5
  require "ctx_cli/options"
6
6
  require "ctx_cli/terminal"
7
7
  require "ctx_cli/initializer"
8
- gem "net-connector", "~> 0.21.0"
8
+ gem "net-connector", ">= 0.21.0", "< 0.23"
9
9
  require "net/connector/inventory/filters"
10
10
  require "yaml"
11
11
  require "ipaddr"
@@ -10,7 +10,7 @@ require_relative "ap_collection"
10
10
  module Wireless
11
11
  # 按单控制器顺序采集,去重共享查询,并区分失败与跳过维度。
12
12
  class Collector
13
- H3C_COMMANDS = H3c::Profile::COMMANDS.except(:lldp).freeze
13
+ H3C_COMMANDS = H3c::Profile::DECLARATIONS.by_dimension.except(:lldp).freeze
14
14
  DEFAULT_DIMENSIONS = H3C_COMMANDS.keys.freeze
15
15
 
16
16
  # 注入时钟和可选 AP 会话工厂;核心采集不加载具体传输。
@@ -28,8 +28,6 @@ module Wireless
28
28
  { dimensions: [ :blocked_clients ], command: "display wlan client-security block-mac", parser: Parsers::DisplayWlanClientSecurityBlockMac },
29
29
  { dimensions: [ :lldp ], command: "display lldp neighbor-information verbose", parser: Parsers::DisplayLldpNeighborInformationVerbose }
30
30
  ])
31
- COMMANDS = DECLARATIONS.by_dimension
32
- PARSERS = DECLARATIONS.parsers
33
31
 
34
32
  # 本平台在当前控制器会话禁用分页。
35
33
  def preparation_command = "screen-length disable"
@@ -12,8 +12,6 @@ module Wireless
12
12
  { dimensions: [ :access_points ], command: "display ap all", parser: Parsers::DisplayApAll },
13
13
  { dimensions: [ :clients ], command: "display station all", parser: Parsers::DisplayStationAll }
14
14
  ])
15
- COMMANDS = DECLARATIONS.by_dimension
16
- PARSERS = DECLARATIONS.parsers
17
15
 
18
16
  # 本平台使用临时会话分页设置。
19
17
  def preparation_command = "screen-length 0 temporary"
@@ -9,7 +9,7 @@ module Wireless
9
9
  PROFILES = { h3c: H3c::Profile, huawei: Huawei::Profile }.freeze
10
10
  PLATFORM_ALIASES = { h3c_wireless: :h3c }.freeze
11
11
  SUPPORTED_PLATFORMS = (PROFILES.keys + PLATFORM_ALIASES.keys).map { |platform| platform.to_s.freeze }.freeze
12
- SUPPORTED_DIMENSIONS = PROFILES.values.flat_map { |profile| profile::COMMANDS.keys }.uniq.freeze
12
+ SUPPORTED_DIMENSIONS = PROFILES.values.flat_map { |profile| profile::DECLARATIONS.by_dimension.keys }.uniq.freeze
13
13
 
14
14
  # 将 h3c_wireless 视为 H3C 无线平台策略的连接器别名。
15
15
  ParserRegistry = CtxParser::Registry.new(profiles: PROFILES, aliases: PLATFORM_ALIASES)
@@ -119,7 +119,7 @@ module Wireless
119
119
  next if observation["status"] == "complete"
120
120
  item("evidence_incomplete", name, "证据不完整,先补采", category: "evidence",
121
121
  evidence: { status: observation["status"], issues: observation.fetch("issues", []).map { |issue| issue["code"] } },
122
- verify: @h3c ? Array(H3c::Profile::COMMANDS[name.to_sym]) : [])
122
+ verify: @h3c ? Array(H3c::Profile::DECLARATIONS.by_dimension[name.to_sym]) : [])
123
123
  end
124
124
  end
125
125
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Wireless
4
4
  # 公开包版本,供 RubyGems 元数据和运行时调用方共用。
5
- VERSION = "0.9.0"
5
+ VERSION = "0.10.0"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wireless-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gatework contributors
@@ -49,7 +49,7 @@ dependencies:
49
49
  requirements:
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 0.5.0
52
+ version: 0.5.1
53
53
  - - "<"
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0.6'
@@ -59,7 +59,7 @@ dependencies:
59
59
  requirements:
60
60
  - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: 0.5.0
62
+ version: 0.5.1
63
63
  - - "<"
64
64
  - !ruby/object:Gem::Version
65
65
  version: '0.6'
@@ -69,27 +69,27 @@ dependencies:
69
69
  requirements:
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
- version: 0.4.0
72
+ version: 0.5.0
73
73
  - - "<"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.5'
75
+ version: '0.6'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 0.4.0
82
+ version: 0.5.0
83
83
  - - "<"
84
84
  - !ruby/object:Gem::Version
85
- version: '0.5'
85
+ version: '0.6'
86
86
  - !ruby/object:Gem::Dependency
87
87
  name: ctx_driver
88
88
  requirement: !ruby/object:Gem::Requirement
89
89
  requirements:
90
90
  - - ">="
91
91
  - !ruby/object:Gem::Version
92
- version: 0.5.0
92
+ version: 0.5.1
93
93
  - - "<"
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0.6'
@@ -99,7 +99,7 @@ dependencies:
99
99
  requirements:
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
- version: 0.5.0
102
+ version: 0.5.1
103
103
  - - "<"
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0.6'