pio 0.17.0 → 0.18.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 +4 -4
- data/CHANGELOG.md +3 -0
- data/features/packet_in_read.feature +16 -14
- data/lib/pio/mac.rb +5 -5
- data/lib/pio/packet_in.rb +1 -1
- data/lib/pio/version.rb +1 -1
- data/pio.gemspec +1 -1
- data/spec/pio/mac_spec.rb +4 -8
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33e35f46e186590c9403a06bff892b694e39cb11
|
4
|
+
data.tar.gz: 04401c6141404c86a66ef792c9e5bcb4c113005a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8803c90d1dd338c2a8a5ec23242ff3bc828276c1da526c2dbb7bf676799c14ce50eacbf3afac0c56c9e2b5a704502ec0008dfc3a9cb93e7ad6a3c7e941c1df9
|
7
|
+
data.tar.gz: 79a9fcd98763f8b5b8c5a18c1d34d2207f5bb27c99887e18c7406e3e124af7daaded7314d203b04708a0074059ce8c4a009a65fb56b707cb27cee8279002a05d
|
data/CHANGELOG.md
CHANGED
@@ -4,17 +4,19 @@ Feature: Pio::PacketIn.read
|
|
4
4
|
When I try to parse the file with "PacketIn" class
|
5
5
|
Then it should finish successfully
|
6
6
|
And the parsed data have the following field and value:
|
7
|
-
| field
|
8
|
-
| class
|
9
|
-
| ofp_version
|
10
|
-
| message_type
|
11
|
-
| message_length
|
12
|
-
| transaction_id
|
13
|
-
| xid
|
14
|
-
| buffer_id
|
15
|
-
| total_len
|
16
|
-
| in_port
|
17
|
-
| reason
|
18
|
-
| raw_data.length
|
19
|
-
| source_mac
|
20
|
-
|
|
7
|
+
| field | value |
|
8
|
+
| class | Pio::PacketIn |
|
9
|
+
| ofp_version | 1 |
|
10
|
+
| message_type | 10 |
|
11
|
+
| message_length | 78 |
|
12
|
+
| transaction_id | 0 |
|
13
|
+
| xid | 0 |
|
14
|
+
| buffer_id | 4294967040 |
|
15
|
+
| total_len | 60 |
|
16
|
+
| in_port | 1 |
|
17
|
+
| reason | no_match |
|
18
|
+
| raw_data.length | 60 |
|
19
|
+
| source_mac | ac:5d:10:31:37:79 |
|
20
|
+
| source_mac.class | Pio::Mac |
|
21
|
+
| destination_mac | ff:ff:ff:ff:ff:ff |
|
22
|
+
| destination_mac.class | Pio::Mac |
|
data/lib/pio/mac.rb
CHANGED
@@ -136,23 +136,23 @@ module Pio
|
|
136
136
|
|
137
137
|
#
|
138
138
|
# Returns +true+ if +other+ can be converted to a {Mac}
|
139
|
-
# object and its
|
139
|
+
# object and its string representation is equal to +obj+'s.
|
140
140
|
#
|
141
141
|
# @example
|
142
142
|
# mac_address = Mac.new("11:22:33:44:55:66")
|
143
143
|
#
|
144
144
|
# mac_address == Mac.new("11:22:33:44:55:66") #=> true
|
145
145
|
# mac_address == "11:22:33:44:55:66" #=> true
|
146
|
-
# mac_address == 0x112233445566 #=> true
|
147
146
|
# mac_address == "INVALID_MAC_ADDRESS" #=> false
|
148
147
|
#
|
149
|
-
# @param other [#
|
150
|
-
#
|
148
|
+
# @param other [#to_s] a {Mac} object or an object that can be
|
149
|
+
# converted to an Ethernet address.
|
151
150
|
#
|
152
151
|
# @return [Boolean]
|
153
152
|
#
|
154
153
|
def ==(other)
|
155
|
-
|
154
|
+
return false if other.is_a?(Integer)
|
155
|
+
to_s == Mac.new(other).to_s
|
156
156
|
rescue InvalidValueError
|
157
157
|
false
|
158
158
|
end
|
data/lib/pio/packet_in.rb
CHANGED
data/lib/pio/version.rb
CHANGED
data/pio.gemspec
CHANGED
@@ -43,7 +43,7 @@ Gem::Specification.new do |gem|
|
|
43
43
|
# Guard
|
44
44
|
gem.add_development_dependency 'guard', '~> 2.12.4'
|
45
45
|
gem.add_development_dependency 'guard-bundler', '~> 2.1.0'
|
46
|
-
gem.add_development_dependency 'guard-cucumber', '~> 1.5.
|
46
|
+
gem.add_development_dependency 'guard-cucumber', '~> 1.5.4'
|
47
47
|
gem.add_development_dependency 'guard-rspec', '~> 4.5.0'
|
48
48
|
gem.add_development_dependency 'guard-rubocop', '~> 1.2.0'
|
49
49
|
gem.add_development_dependency 'rb-fchange', '~> 0.0.6'
|
data/spec/pio/mac_spec.rb
CHANGED
@@ -12,8 +12,7 @@ describe Pio::Mac do
|
|
12
12
|
it { is_expected.to eq '11:22:33:44:55:66' }
|
13
13
|
it { is_expected.not_to eq Pio::Mac.new('66:55:44:33:22:11') }
|
14
14
|
it { is_expected.not_to eq '66:55:44:33:22:11' }
|
15
|
-
it { is_expected.
|
16
|
-
it { is_expected.not_to eq 42 }
|
15
|
+
it { is_expected.not_to eq 0x112233445566 }
|
17
16
|
it { is_expected.not_to eq 'INVALID_MAC_ADDRESS' }
|
18
17
|
end
|
19
18
|
|
@@ -22,8 +21,7 @@ describe Pio::Mac do
|
|
22
21
|
it { expect(subject).to eql '11:22:33:44:55:66' }
|
23
22
|
it { expect(subject).not_to eql Pio::Mac.new('66:55:44:33:22:11') }
|
24
23
|
it { expect(subject).not_to eql '66:55:44:33:22:11' }
|
25
|
-
it { expect(subject).
|
26
|
-
it { expect(subject).not_to eql 42 }
|
24
|
+
it { expect(subject).not_to eql 0x112233445566 }
|
27
25
|
it { expect(subject).not_to eql 'INVALID_MAC_ADDRESS' }
|
28
26
|
end
|
29
27
|
|
@@ -81,8 +79,7 @@ describe Pio::Mac do
|
|
81
79
|
it { is_expected.not_to eq Pio::Mac.new('66:55:44:33:22:11') }
|
82
80
|
it { is_expected.not_to eq '6655.4433.2211' }
|
83
81
|
it { is_expected.not_to eq '66:55:44:33:22:11' }
|
84
|
-
it { is_expected.
|
85
|
-
it { is_expected.not_to eq 42 }
|
82
|
+
it { is_expected.not_to eq 0x112233445566 }
|
86
83
|
it { is_expected.not_to eq 'INVALID_MAC_ADDRESS' }
|
87
84
|
end
|
88
85
|
|
@@ -95,8 +92,7 @@ describe Pio::Mac do
|
|
95
92
|
it { expect(subject).not_to eql Pio::Mac.new('66:55:44:33:22:11') }
|
96
93
|
it { expect(subject).not_to eql '6655.4433.2211' }
|
97
94
|
it { expect(subject).not_to eql '66:55:44:33:22:11' }
|
98
|
-
it { expect(subject).
|
99
|
-
it { expect(subject).not_to eql 42 }
|
95
|
+
it { expect(subject).not_to eql 0x112233445566 }
|
100
96
|
it { expect(subject).not_to eql 'INVALID_MAC_ADDRESS' }
|
101
97
|
end
|
102
98
|
|
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.
|
4
|
+
version: 0.18.0
|
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-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bindata
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 1.5.
|
103
|
+
version: 1.5.4
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 1.5.
|
110
|
+
version: 1.5.4
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: guard-rspec
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|