pio 0.18.0 → 0.18.1

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
  SHA1:
3
- metadata.gz: 33e35f46e186590c9403a06bff892b694e39cb11
4
- data.tar.gz: 04401c6141404c86a66ef792c9e5bcb4c113005a
3
+ metadata.gz: b1aaeba878ba42a95f7512584b62bcdc4664e023
4
+ data.tar.gz: 76acc8af59e5950e6512e810cba7d8b63e90a9f3
5
5
  SHA512:
6
- metadata.gz: f8803c90d1dd338c2a8a5ec23242ff3bc828276c1da526c2dbb7bf676799c14ce50eacbf3afac0c56c9e2b5a704502ec0008dfc3a9cb93e7ad6a3c7e941c1df9
7
- data.tar.gz: 79a9fcd98763f8b5b8c5a18c1d34d2207f5bb27c99887e18c7406e3e124af7daaded7314d203b04708a0074059ce8c4a009a65fb56b707cb27cee8279002a05d
6
+ metadata.gz: 288b7d5cdfdeae54f6cbcb48ce5890ffec014aa7b1099442ea0abb659950f62dd6ed9b279e999ba4040fdaef34cf3f9d4655a7505e55525f841f24a7f8a1b87c
7
+ data.tar.gz: daf919d605c6b42d1dd41b79a169ee147249a38773de9cb44af1e6c1c18a6705ba7c47e9ad591e36470fc2388489faab9843ba69960b82b7454ec77d1dc2af5d
data/CHANGELOG.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # Changelog
2
2
 
3
3
  ## develop (unreleased)
4
+
5
+
6
+ ## 0.18.1 (3/11/2015)
7
+ ### Changes
8
+ * `Lldp#port_number` returns primitive Ruby objects.
9
+
10
+
11
+ ## 0.18.0 (3/9/2015)
4
12
  ### Changes
5
13
  * Deprecated `Pio::Mac#== Integer`.
6
14
  * `Pio::PacketIn#source_mac` and `Pio::PacketIn#destination_mac` returns `Pio::Mac`.
@@ -3,6 +3,22 @@ Feature: Pio::Lldp.read
3
3
  Given a packet data file "lldp.minimal.pcap"
4
4
  When I try to parse the file with "Lldp" class
5
5
  Then it should finish successfully
6
+ Then the parsed data #1 have the following field and value:
7
+ | field | value |
8
+ | class | Pio::Lldp |
9
+ | destination_mac | 01:80:c2:00:00:0e |
10
+ | source_mac | 00:04:96:1f:a7:26 |
11
+ | ether_type | 35020 |
12
+ | chassis_id | 19698525990 |
13
+ | dpid | 19698525990 |
14
+ | port_id | 1/3 |
15
+ | ttl | 120 |
16
+ | port_description | |
17
+ | system_name | |
18
+ | system_description | |
19
+ | system_capabilities | |
20
+ | management_address | |
21
+ | organizationally_specific | |
6
22
 
7
23
  Scenario: lldp.detailed.pcap
8
24
  Given a packet data file "lldp.detailed.pcap"
data/lib/pio/lldp.rb CHANGED
@@ -16,7 +16,6 @@ module Pio
16
16
  def_delegator :@frame, :dpid
17
17
  def_delegator :@frame, :optional_tlv
18
18
  def_delegator :@frame, :port_id
19
- alias_method :port_number, :port_id
20
19
  def_delegator :@frame, :ttl
21
20
  def_delegator :@frame, :port_description
22
21
  def_delegator :@frame, :system_name
@@ -42,6 +41,10 @@ module Pio
42
41
  @frame = Frame.new(Options.new(options).to_hash)
43
42
  end
44
43
 
44
+ def port_number
45
+ @frame.port_id.get.snapshot
46
+ end
47
+
45
48
  def to_binary
46
49
  @frame.to_binary_s + "\000" * (64 - @frame.num_bytes)
47
50
  end
data/lib/pio/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # Base module.
2
2
  module Pio
3
3
  # gem version.
4
- VERSION = '0.18.0'.freeze
4
+ VERSION = '0.18.1'.freeze
5
5
  end
@@ -153,6 +153,7 @@ describe Pio::Lldp do
153
153
  Then { lldp.chassis_id == 0x192fa7b28d }
154
154
  Then { lldp.port_id == 'Uplink to S1' }
155
155
  Then { lldp.port_number == 'Uplink to S1' }
156
+ Then { lldp.port_number.class == String }
156
157
  Then { lldp.ttl == 120 }
157
158
  Then { lldp.port_description == nil }
158
159
  Then { lldp.system_name == nil }
@@ -214,6 +215,7 @@ describe Pio::Lldp do
214
215
  Then { lldp.chassis_id == 0x192fa7b28d }
215
216
  Then { lldp.port_id == 'Uplink to S1' }
216
217
  Then { lldp.port_number == 'Uplink to S1' }
218
+ Then { lldp.port_number.class == String }
217
219
  Then { lldp.ttl == 120 }
218
220
  Then { lldp.port_description == 'Summit300-48-Port 1001' }
219
221
  Then { lldp.system_name == 'Summit300-48' }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasuhito Takamiya
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-09 00:00:00.000000000 Z
11
+ date: 2015-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bindata