pio 0.7.0 → 0.8.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.
@@ -7,7 +7,7 @@ describe Pio::Echo::Reply do
7
7
  context 'with no arguments' do
8
8
  When(:echo_reply) { Pio::Echo::Reply.new }
9
9
 
10
- Then { echo_reply.version == 1 }
10
+ Then { echo_reply.ofp_version == 1 }
11
11
  Then { echo_reply.message_type == Pio::Echo::REPLY }
12
12
  Then { echo_reply.message_length == 8 }
13
13
  Then { echo_reply.transaction_id == 0 }
@@ -19,7 +19,7 @@ describe Pio::Echo::Reply do
19
19
  context 'with 123' do
20
20
  When(:echo_reply) { Pio::Echo::Reply.new(123) }
21
21
 
22
- Then { echo_reply.version == 1 }
22
+ Then { echo_reply.ofp_version == 1 }
23
23
  Then { echo_reply.message_type == Pio::Echo::REPLY }
24
24
  Then { echo_reply.message_length == 8 }
25
25
  Then { echo_reply.transaction_id == 123 }
@@ -40,7 +40,7 @@ describe Pio::Echo::Reply do
40
40
  context 'with transaction_id: 123' do
41
41
  When(:echo_reply) { Pio::Echo::Reply.new(transaction_id: 123) }
42
42
 
43
- Then { echo_reply.version == 1 }
43
+ Then { echo_reply.ofp_version == 1 }
44
44
  Then { echo_reply.message_type == Pio::Echo::REPLY }
45
45
  Then { echo_reply.message_length == 8 }
46
46
  Then { echo_reply.transaction_id == 123 }
@@ -52,7 +52,7 @@ describe Pio::Echo::Reply do
52
52
  context 'with xid: 123' do
53
53
  When(:echo_reply) { Pio::Echo::Reply.new(xid: 123) }
54
54
 
55
- Then { echo_reply.version == 1 }
55
+ Then { echo_reply.ofp_version == 1 }
56
56
  Then { echo_reply.message_type == Pio::Echo::REPLY }
57
57
  Then { echo_reply.message_length == 8 }
58
58
  Then { echo_reply.transaction_id == 123 }
@@ -64,7 +64,7 @@ describe Pio::Echo::Reply do
64
64
  context "with transaction_id: 123, data: 'foobar'" do
65
65
  When(:echo_reply) { Pio::Echo::Reply.new(xid: 123, data: 'foobar') }
66
66
 
67
- Then { echo_reply.version == 1 }
67
+ Then { echo_reply.ofp_version == 1 }
68
68
  Then { echo_reply.message_type == Pio::Echo::REPLY }
69
69
  Then { echo_reply.message_length == 14 }
70
70
  Then { echo_reply.transaction_id == 123 }
@@ -7,7 +7,7 @@ describe Pio::Echo::Request do
7
7
  context 'with no arguments' do
8
8
  When(:echo_request) { Pio::Echo::Request.new }
9
9
 
10
- Then { echo_request.version == 1 }
10
+ Then { echo_request.ofp_version == 1 }
11
11
  Then { echo_request.message_type == Pio::Echo::REQUEST }
12
12
  Then { echo_request.message_length == 8 }
13
13
  Then { echo_request.transaction_id == 0 }
@@ -19,7 +19,7 @@ describe Pio::Echo::Request do
19
19
  context 'with 123' do
20
20
  When(:echo_request) { Pio::Echo::Request.new(123) }
21
21
 
22
- Then { echo_request.version == 1 }
22
+ Then { echo_request.ofp_version == 1 }
23
23
  Then { echo_request.message_type == Pio::Echo::REQUEST }
24
24
  Then { echo_request.message_length == 8 }
25
25
  Then { echo_request.transaction_id == 123 }
@@ -40,7 +40,7 @@ describe Pio::Echo::Request do
40
40
  context 'with transaction_id: 123' do
41
41
  When(:echo_request) { Pio::Echo::Request.new(transaction_id: 123) }
42
42
 
43
- Then { echo_request.version == 1 }
43
+ Then { echo_request.ofp_version == 1 }
44
44
  Then { echo_request.message_type == Pio::Echo::REQUEST }
45
45
  Then { echo_request.message_length == 8 }
46
46
  Then { echo_request.transaction_id == 123 }
@@ -52,7 +52,7 @@ describe Pio::Echo::Request do
52
52
  context 'with xid: 123' do
53
53
  When(:echo_request) { Pio::Echo::Request.new(xid: 123) }
54
54
 
55
- Then { echo_request.version == 1 }
55
+ Then { echo_request.ofp_version == 1 }
56
56
  Then { echo_request.message_type == Pio::Echo::REQUEST }
57
57
  Then { echo_request.message_length == 8 }
58
58
  Then { echo_request.transaction_id == 123 }
@@ -64,7 +64,7 @@ describe Pio::Echo::Request do
64
64
  context "with transaction_id: 123, data: 'foobar'" do
65
65
  When(:echo_request) { Pio::Echo::Request.new(xid: 123, data: 'foobar') }
66
66
 
67
- Then { echo_request.version == 1 }
67
+ Then { echo_request.ofp_version == 1 }
68
68
  Then { echo_request.message_type == Pio::Echo::REQUEST }
69
69
  Then { echo_request.message_length == 14 }
70
70
  Then { echo_request.transaction_id == 123 }
@@ -14,7 +14,7 @@ describe Pio::Echo do
14
14
  end
15
15
 
16
16
  Then { echo_request.class == Pio::Echo::Request }
17
- Then { echo_request.version == 1 }
17
+ Then { echo_request.ofp_version == 1 }
18
18
  Then { echo_request.message_type == Pio::Echo::REQUEST }
19
19
  Then { echo_request.message_length == 8 }
20
20
  Then { echo_request.xid == 0 }
@@ -32,7 +32,7 @@ describe Pio::Echo do
32
32
  end
33
33
 
34
34
  Then { echo_reply.class == Pio::Echo::Reply }
35
- Then { echo_reply.version == 1 }
35
+ Then { echo_reply.ofp_version == 1 }
36
36
  Then { echo_reply.message_type == Pio::Echo::REPLY }
37
37
  Then { echo_reply.message_length == 8 }
38
38
  Then { echo_reply.xid == 0 }
@@ -16,7 +16,7 @@ describe Pio::Features::Reply do
16
16
 
17
17
  When(:features_reply) { Pio::Features::Reply.new(options) }
18
18
 
19
- Then { features_reply.version == 1 }
19
+ Then { features_reply.ofp_version == 1 }
20
20
  Then { features_reply.message_type == Pio::Features::REPLY }
21
21
  Then { features_reply.transaction_id == 0 }
22
22
  Then { features_reply.xid == 0 }
@@ -7,7 +7,7 @@ describe Pio::Features::Request do
7
7
  context 'with no arguments' do
8
8
  When(:request) { Pio::Features::Request.new }
9
9
 
10
- Then { request.version == 1 }
10
+ Then { request.ofp_version == 1 }
11
11
  Then { request.message_type == Pio::Features::REQUEST }
12
12
  Then { request.message_length == 8 }
13
13
  Then { request.transaction_id == 0 }
@@ -19,7 +19,7 @@ describe Pio::Features::Request do
19
19
  context 'with 123' do
20
20
  When(:request) { Pio::Features::Request.new(123) }
21
21
 
22
- Then { request.version == 1 }
22
+ Then { request.ofp_version == 1 }
23
23
  Then { request.message_type == Pio::Features::REQUEST }
24
24
  Then { request.message_length == 8 }
25
25
  Then { request.transaction_id == 123 }
@@ -40,7 +40,7 @@ describe Pio::Features::Request do
40
40
  context 'with transaction_id: 123' do
41
41
  When(:request) { Pio::Features::Request.new(transaction_id: 123) }
42
42
 
43
- Then { request.version == 1 }
43
+ Then { request.ofp_version == 1 }
44
44
  Then { request.message_type == Pio::Features::REQUEST }
45
45
  Then { request.message_length == 8 }
46
46
  Then { request.transaction_id == 123 }
@@ -52,7 +52,7 @@ describe Pio::Features::Request do
52
52
  context 'with xid: 123' do
53
53
  When(:request) { Pio::Features::Request.new(xid: 123) }
54
54
 
55
- Then { request.version == 1 }
55
+ Then { request.ofp_version == 1 }
56
56
  Then { request.message_type == Pio::Features::REQUEST }
57
57
  Then { request.message_length == 8 }
58
58
  Then { request.transaction_id == 123 }
@@ -10,7 +10,7 @@ describe Pio::Features do
10
10
  When(:features_request) { Pio::Features.read(features_request_dump) }
11
11
 
12
12
  Then { features_request.class == Pio::Features::Request }
13
- Then { features_request.version == 1 }
13
+ Then { features_request.ofp_version == 1 }
14
14
  Then { features_request.message_type == Pio::Features::REQUEST }
15
15
  Then { features_request.message_length == 8 }
16
16
  Then { features_request.transaction_id == 0 }
@@ -53,7 +53,7 @@ describe Pio::Features do
53
53
  When(:features_reply) { Pio::Features.read(features_reply_dump) }
54
54
 
55
55
  Then { features_reply.class == Pio::Features::Reply }
56
- Then { features_reply.version == 1 }
56
+ Then { features_reply.ofp_version == 1 }
57
57
  Then { features_reply.message_type == Pio::Features::REPLY }
58
58
  Then { features_reply.message_length == 272 }
59
59
  Then { features_reply.transaction_id == 2 }
@@ -10,7 +10,7 @@ describe Pio::Hello do
10
10
  When(:hello) { Pio::Hello.read(hello_dump) }
11
11
 
12
12
  Then { hello.class == Pio::Hello }
13
- Then { hello.version == 1 }
13
+ Then { hello.ofp_version == 1 }
14
14
  Then { hello.message_type == 0 }
15
15
  Then { hello.message_length == 8 }
16
16
  Then { hello.transaction_id == 0 }
@@ -31,7 +31,7 @@ describe Pio::Hello do
31
31
  context 'with no arguments' do
32
32
  When(:hello) { Pio::Hello.new }
33
33
 
34
- Then { hello.version == 1 }
34
+ Then { hello.ofp_version == 1 }
35
35
  Then { hello.message_type == 0 }
36
36
  Then { hello.message_length == 8 }
37
37
  Then { hello.transaction_id == 0 }
@@ -43,7 +43,7 @@ describe Pio::Hello do
43
43
  context 'with 123' do
44
44
  When(:hello) { Pio::Hello.new(123) }
45
45
 
46
- Then { hello.version == 1 }
46
+ Then { hello.ofp_version == 1 }
47
47
  Then { hello.message_type == 0 }
48
48
  Then { hello.message_length == 8 }
49
49
  Then { hello.transaction_id == 123 }
@@ -64,7 +64,7 @@ describe Pio::Hello do
64
64
  context 'with transaction_id: 123' do
65
65
  When(:hello) { Pio::Hello.new(transaction_id: 123) }
66
66
 
67
- Then { hello.version == 1 }
67
+ Then { hello.ofp_version == 1 }
68
68
  Then { hello.message_type == 0 }
69
69
  Then { hello.message_length == 8 }
70
70
  Then { hello.transaction_id == 123 }
@@ -76,7 +76,7 @@ describe Pio::Hello do
76
76
  context 'with xid: 123' do
77
77
  When(:hello) { Pio::Hello.new(xid: 123) }
78
78
 
79
- Then { hello.version == 1 }
79
+ Then { hello.ofp_version == 1 }
80
80
  Then { hello.message_type == 0 }
81
81
  Then { hello.message_length == 8 }
82
82
  Then { hello.transaction_id == 123 }
@@ -26,43 +26,43 @@ describe Pio::Icmp::Reply, '.new' do
26
26
  Then do
27
27
  result ==
28
28
  [
29
- # Destination MAC
29
+ # Destination MAC
30
30
  0x00, 0x26, 0x82, 0xeb, 0xea, 0xd1,
31
- # Source MAC
31
+ # Source MAC
32
32
  0x24, 0xdb, 0xac, 0x41, 0xe5, 0x5b,
33
- # EtherType
33
+ # EtherType
34
34
  0x08, 0x00,
35
- # IP Version&IP Header Length
35
+ # IP Version&IP Header Length
36
36
  0x45,
37
- # IP Type Of Service
37
+ # IP Type Of Service
38
38
  0x00,
39
- # IP Total Length
39
+ # IP Total Length
40
40
  0x00, 0x3c,
41
- # IP Identifier
41
+ # IP Identifier
42
42
  0x00, 0x00,
43
- # IP Flag&IP Fragment
43
+ # IP Flag&IP Fragment
44
44
  0x00, 0x00,
45
- # IP TTL
45
+ # IP TTL
46
46
  0x80,
47
- # IP Protocol
47
+ # IP Protocol
48
48
  0x01,
49
- # IP Header Checksum
49
+ # IP Header Checksum
50
50
  0x68, 0xa3,
51
- # IP Source Address
51
+ # IP Source Address
52
52
  0x08, 0x08, 0x08, 0x08,
53
- # IP Destination Address
53
+ # IP Destination Address
54
54
  0xc0, 0xa8, 0x01, 0x66,
55
- # ICMP Type
55
+ # ICMP Type
56
56
  0x00,
57
- # ICMP Code
57
+ # ICMP Code
58
58
  0x00,
59
- # ICMP Checksum
59
+ # ICMP Checksum
60
60
  0x51, 0x18,
61
- # ICMP Identifier
61
+ # ICMP Identifier
62
62
  0x01, 0x23,
63
- # ICMP Sequence Number
63
+ # ICMP Sequence Number
64
64
  0x03, 0x21,
65
- # Echo Data
65
+ # Echo Data
66
66
  0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
67
67
  0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e,
68
68
  0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75,
@@ -90,43 +90,43 @@ describe Pio::Icmp::Reply, '.new' do
90
90
  Then do
91
91
  result ==
92
92
  [
93
- # Destination MAC
93
+ # Destination MAC
94
94
  0x00, 0x26, 0x82, 0xeb, 0xea, 0xd1,
95
- # Source MAC
95
+ # Source MAC
96
96
  0x24, 0xdb, 0xac, 0x41, 0xe5, 0x5b,
97
- # EtherType
97
+ # EtherType
98
98
  0x08, 0x00,
99
- # IP Version&IP Header Length
99
+ # IP Version&IP Header Length
100
100
  0x45,
101
- # IP Type Of Service
101
+ # IP Type Of Service
102
102
  0x00,
103
- # IP Total Length
103
+ # IP Total Length
104
104
  0x00, 0x32,
105
- # IP Identifier
105
+ # IP Identifier
106
106
  0x00, 0x00,
107
- # IP Flag&IP Fragment
107
+ # IP Flag&IP Fragment
108
108
  0x00, 0x00,
109
- # IP TTL
109
+ # IP TTL
110
110
  0x80,
111
- # IP Protocol
111
+ # IP Protocol
112
112
  0x01,
113
- # IP Header Checksum
113
+ # IP Header Checksum
114
114
  0x68, 0xad,
115
- # IP Source Address
115
+ # IP Source Address
116
116
  0x08, 0x08, 0x08, 0x08,
117
- # IP Destination Address
117
+ # IP Destination Address
118
118
  0xc0, 0xa8, 0x01, 0x66,
119
- # ICMP Type
119
+ # ICMP Type
120
120
  0x00,
121
- # ICMP Code
121
+ # ICMP Code
122
122
  0x00,
123
- # ICMP Checksum
123
+ # ICMP Checksum
124
124
  0xfb, 0xbb,
125
- # ICMP Identifier
125
+ # ICMP Identifier
126
126
  0x01, 0x23,
127
- # ICMP Sequence Number
127
+ # ICMP Sequence Number
128
128
  0x03, 0x21,
129
- # Echo Data
129
+ # Echo Data
130
130
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
131
131
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
132
132
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -26,43 +26,43 @@ describe Pio::Icmp::Request, '.new' do
26
26
  Then do
27
27
  result ==
28
28
  [
29
- # Destination MAC
29
+ # Destination MAC
30
30
  0x24, 0xdb, 0xac, 0x41, 0xe5, 0x5b,
31
- # Source MAC
31
+ # Source MAC
32
32
  0x74, 0xe5, 0x0b, 0x2a, 0x18, 0xf8,
33
- # EtherType
33
+ # EtherType
34
34
  0x08, 0x00,
35
- # IP Version&IP Header Length
35
+ # IP Version&IP Header Length
36
36
  0x45,
37
- # IP Type Of Service
37
+ # IP Type Of Service
38
38
  0x00,
39
- # IP Total Length
39
+ # IP Total Length
40
40
  0x00, 0x3c,
41
- # IP Identifier
41
+ # IP Identifier
42
42
  0x00, 0x00,
43
- # IP Flag&IP Fragment
43
+ # IP Flag&IP Fragment
44
44
  0x00, 0x00,
45
- # IP TTL
45
+ # IP TTL
46
46
  0x80,
47
- # IP Protocol
47
+ # IP Protocol
48
48
  0x01,
49
- # IP Header Checksum
49
+ # IP Header Checksum
50
50
  0x68, 0xa4,
51
- # IP Source Address
51
+ # IP Source Address
52
52
  0xc0, 0xa8, 0x01, 0x65,
53
- # IP Destination Address
53
+ # IP Destination Address
54
54
  0x08, 0x08, 0x08, 0x08,
55
- # ICMP Type
55
+ # ICMP Type
56
56
  0x08,
57
- # ICMP Code
57
+ # ICMP Code
58
58
  0x00,
59
- # ICMP Checksum
59
+ # ICMP Checksum
60
60
  0x49, 0x18,
61
- # ICMP Identifier
61
+ # ICMP Identifier
62
62
  0x01, 0x23,
63
- # ICMP Sequence Number
63
+ # ICMP Sequence Number
64
64
  0x03, 0x21,
65
- # Echo Data
65
+ # Echo Data
66
66
  0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
67
67
  0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e,
68
68
  0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75,
@@ -91,43 +91,43 @@ describe Pio::Icmp::Request, '.new' do
91
91
  Then do
92
92
  result ==
93
93
  [
94
- # Destination MAC
94
+ # Destination MAC
95
95
  0x24, 0xdb, 0xac, 0x41, 0xe5, 0x5b,
96
- # Source MAC
96
+ # Source MAC
97
97
  0x74, 0xe5, 0x0b, 0x2a, 0x18, 0xf8,
98
- # EtherType
98
+ # EtherType
99
99
  0x08, 0x00,
100
- # IP Version&IP Header Length
100
+ # IP Version&IP Header Length
101
101
  0x45,
102
- # IP Type Of Service
102
+ # IP Type Of Service
103
103
  0x00,
104
- # IP Total Length
104
+ # IP Total Length
105
105
  0x00, 0x32,
106
- # IP Identifier
106
+ # IP Identifier
107
107
  0x00, 0x00,
108
- # IP Flag&IP Fragment
108
+ # IP Flag&IP Fragment
109
109
  0x00, 0x00,
110
- # IP TTL
110
+ # IP TTL
111
111
  0x80,
112
- # IP Protocol
112
+ # IP Protocol
113
113
  0x01,
114
- # IP Header Checksum
114
+ # IP Header Checksum
115
115
  0x68, 0xae,
116
- # IP Source Address
116
+ # IP Source Address
117
117
  0xc0, 0xa8, 0x01, 0x65,
118
- # IP Destination Address
118
+ # IP Destination Address
119
119
  0x08, 0x08, 0x08, 0x08,
120
- # ICMP Type
120
+ # ICMP Type
121
121
  0x08,
122
- # ICMP Code
122
+ # ICMP Code
123
123
  0x00,
124
- # ICMP Checksum
124
+ # ICMP Checksum
125
125
  0xf3, 0xbb,
126
- # ICMP Identifier
126
+ # ICMP Identifier
127
127
  0x01, 0x23,
128
- # ICMP Sequence Number
128
+ # ICMP Sequence Number
129
129
  0x03, 0x21,
130
- # Echo Data
130
+ # Echo Data
131
131
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
132
132
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
133
133
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,