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 +4 -4
- data/CHANGELOG.md +8 -0
- data/features/lldp_read.feature +16 -0
- data/lib/pio/lldp.rb +4 -1
- data/lib/pio/version.rb +1 -1
- data/spec/pio/lldp_spec.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1aaeba878ba42a95f7512584b62bcdc4664e023
|
4
|
+
data.tar.gz: 76acc8af59e5950e6512e810cba7d8b63e90a9f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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`.
|
data/features/lldp_read.feature
CHANGED
@@ -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
data/spec/pio/lldp_spec.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2015-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bindata
|