Skip to content

Commit 8a01806

Browse files
committed
v0.2.2-alpha
**Changes** - Add pkt-json-str - Add feature odl-openflowplugin-app-table-miss-enforcer to suppot tall version OVS - Initialize the DataStore
1 parent 898239a commit 8a01806

7 files changed

Lines changed: 106 additions & 96 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Release 0.2.x
22

3+
## v0.2.2-alpha (2017/03/14)
4+
5+
v0.2.2-alpha
6+
7+
**Changes**
8+
9+
- Add pkt-json-str
10+
- Add feature odl-openflowplugin-app-table-miss-enforcer to suppot tall version OVS
11+
- Initialize the DataStore
312

413
## v0.2.1-alpha (2017/03/14)
514

@@ -8,7 +17,6 @@ v0.2.1-alpha
817
**Changes**
918

1019
- Fix a bug
11-
- Initialize the DataStore
1220

1321
## v0.2.0-alpha (2017/03/04)
1422

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ It will do the following things:
4848
1. Download the zip file of the latest maple release into `/tmp`
4949
2. Unzip the latest maple release into `$HOME/.maple/`
5050
3. Download and uncompress maven `settings.xml` and maple library into `$HOME/.m2/`
51-
4. ~~Check out the source code of maple-archetype from Github to `/tmp`, then compile and install it~~
5251

5352
And then, you can start the maple controller by using the [start script](https://raw.githubusercontent.com/snlab/Maple-release/master/utils/start_maple.sh), you will see an output as `ODLMapleProvider Session Initiated` in terminal:
5453

doc/pkt.png

53.2 KB
Loading

doc/pktjsonstr.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
## pkt-json-str
2+
3+
The 'pkt' field of TraceTree history response is as follows.
4+
5+
6+
```json
7+
8+
"pkt": {
9+
"pkt-str": "MaplePacket [ingressPort=openflow:4:1, frame=\nip\ndl_vlan: untagged\ndl_vlan_pcp: 0\ndl_src: 46:53:e1:35:12:6f\ndl_dst: 32:49:3b:f1:88:7d\nnw_src: 10.0.0.2\nnw_dst: 10.0.0.1\nnw_tos: 0\nnw_proto: 6\ntcpsrc: 80\ntcpdst: 44396]",
10+
"pkt-hex": "32:49:3b:f1:88:7d:46:53:e1:35:12:6f:08:00:45:00:00:3c:00:00:40:00:40:06:26:ba:0a:00:00:02:0a:00:00:01:00:50:ad:6c:2e:85:0f:5b:47:82:86:5a:a0:12:71:20:88:25:00:00:02:04:05:b4:04:02:08:0a:00:1d:40:79:00:1d:40:79:01:03:03:09",
11+
"timestamp": "05-04-2017 09:43:15:043",
12+
"pkt-json-str": "{\"ingressPort\":\"openflow:4:1\",\"frame\":{\"payload\":{\"fragmentOffset\":\"0x0000\",\"IPv4_DST\":\"10.0.0.1\",\"IPv4_SRC\":\"10.0.0.2\",\"length\":\"0x05\",\"flags\":\"0x02\",\"version\":\"0x04\",\"diffServ\":\"0x00\",\"ttl\":\"0x40\",\"protocol\":\"0x06\",\"identification\":\"0x0000\",\"payload\":{\"sequence\":\"0x2e850f5b\",\"dataOffset\":\"0x0a\",\"windowSize\":\"0x7120\",\"srcip\":\"0x0000\",\"TCP_DST_PORT\":\"0xad6c\",\"acknowledge\":\"0x4782865a\",\"payload\":{\"data\":\"\"},\"flags\":\"0x0012\",\"checksum\":\"0x8825\",\"options\":\"0x020405b40402080a001d4079001d407901030309\",\"TCP_SRC_PORT\":\"0x0050\"},\"totallength\":\"0x003c\",\"checksum\":\"0x26ba\"},\"ETH_SRC\":\"46:53:E1:35:12:6F\",\"ETH_DST\":\"32:49:3B:F1:88:7D\",\"ETH_TYPE\":\"0x0800\"}}"
13+
},
14+
15+
```
16+
17+
The 'pkt-json-str' field can be parsed as JSON Object like this.
18+
19+
```js
20+
var i=0;
21+
function test(){
22+
$.ajax({
23+
url: 'http://localhost:8181/restconf/operational/maple-tracetree-history:tracetreehistory/history/'+i+'/',
24+
type: 'GET',
25+
dataType: 'json',
26+
timeout: 1000,
27+
cache: false,
28+
beforeSend: LoadFunction,
29+
error: erryFunction,
30+
success: succFunction
31+
})
32+
function LoadFunction(xhr){
33+
xhr.setRequestHeader("Authorization", "Basic " + "YWRtaW46YWRtaW4=");
34+
}
35+
function erryFunction(){
36+
alert("error");
37+
}
38+
function succFunction(tt){
39+
i++;
40+
str=tt.history[0].pkt['pkt-json-str'];
41+
t1=JSON.parse(str);
42+
console.log(tt);
43+
console.log(t1);
44+
}
45+
}
46+
47+
```
48+
49+
the JSON Object is a hierarchical structure like this, all fields except 'ETH_DST', 'ETH_SRC', 'IPv4_DST' and 'IPv4_SRC' are encoded in hexadecimal.
50+
51+
![](pkt.png)
52+
53+
54+
55+
56+

doc/tracehistory.md

Lines changed: 38 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -183,156 +183,111 @@ GET http://localhost:8181/restconf/operational/maple-tracetree-history:tracetree
183183
{
184184
"history": [
185185
{
186-
"seq": 15,
186+
"seq": 23,
187187
"pkt": {
188-
"pkt-hex": "00:00:00:00:00:03:00:00:00:00:00:01:08:06:00:01:08:00:06:04:00:02:00:00:00:00:00:01:0a:00:00:01:00:00:00:00:00:03:0a:00:00:03",
189-
"timestamp": "03-03-2017 21:28:27:560",
190-
"pkt-str": "MaplePacket [ingressPort=openflow:3:3, frame=\narp\ndl_vlan: untagged\ndl_vlan_pcp: 0\ndl_src: 00:00:00:00:00:01\ndl_dst: 00:00:00:00:00:03\nnw_src: 10.0.0.1\nnw_dst: 10.0.0.3]"
188+
"pkt-str": "MaplePacket [ingressPort=openflow:3:2, frame=\narp\ndl_vlan: untagged\ndl_vlan_pcp: 0\ndl_src: 8a:95:62:10:ab:6d\ndl_dst: a6:73:53:ac:03:be\nnw_src: 10.0.0.2\nnw_dst: 10.0.0.1]",
189+
"pkt-hex": "a6:73:53:ac:03:be:8a:95:62:10:ab:6d:08:06:00:01:08:00:06:04:00:02:8a:95:62:10:ab:6d:0a:00:00:02:a6:73:53:ac:03:be:0a:00:00:01",
190+
"timestamp": "05-04-2017 08:13:28:063",
191+
"pkt-json-str": "{\"ingressPort\":\"openflow:3:2\",\"frame\":{\"eth_src\":\"8A:95:62:10:AB:6D\",\"eth_dst\":\"A6:73:53:AC:03:BE\",\"eth_type\":\"0x0806\",\"payload\":{\"protocolAddressLength\":\"0x04\",\"targetProtocolAddress\":\"0x0a000001\",\"hardwareType\":\"0x0001\",\"opCode\":\"0x0002\",\"protocolType\":\"0x0800\",\"targetHardwareAddress\":\"0xa67353ac03be\",\"senderHardwareAddress\":\"0x8a956210ab6d\",\"senderProtocolAddress\":\"0x0a000002\",\"hardwareAddressLength\":\"0x06\"}}}"
191192
},
192193
"tracetree-v2": {
193194
"tt-link-v2": [
194195
{
195196
"id": "8",
196-
"predicate-id": "6",
197-
"condition": "10.0.0.1",
198-
"destination-id": "7"
199-
},
200-
{
201-
"id": "9",
202-
"predicate-id": "1",
203-
"condition": "10.0.0.3",
204-
"destination-id": "6"
197+
"predicate-id": "0",
198+
"condition": "IPv4",
199+
"destination-id": "1"
205200
},
206201
{
207-
"id": "12",
208-
"predicate-id": "0",
209-
"condition": "ARP",
210-
"destination-id": "11"
202+
"id": "5",
203+
"predicate-id": "3",
204+
"condition": "!= 80",
205+
"destination-id": "4"
211206
},
212207
{
213-
"id": "4",
208+
"id": "6",
214209
"predicate-id": "2",
215-
"condition": "10.0.0.3",
210+
"condition": "== 10.0.0.2",
216211
"destination-id": "3"
217212
},
218213
{
219-
"id": "5",
214+
"id": "7",
220215
"predicate-id": "1",
221-
"condition": "10.0.0.1",
216+
"condition": "== 10.0.0.1",
222217
"destination-id": "2"
223218
},
224219
{
225220
"id": "10",
226221
"predicate-id": "0",
227-
"condition": "IPv4",
228-
"destination-id": "1"
222+
"condition": "ARP",
223+
"destination-id": "9"
229224
}
230225
],
231226
"tt-node-v2": [
232227
{
233-
"id": "7",
228+
"id": "4",
234229
"type": "L",
235230
"action-type": "Path",
236231
"link": [
237232
{
238-
"link-id": "openflow:3:3",
233+
"link-id": "openflow:1:4",
239234
"dst-node": {
240235
"node-id": "openflow:0",
241236
"port": "openflow:0:0"
242237
},
243238
"src-node": {
244-
"node-id": "openflow:3",
245-
"port": "openflow:3:3"
239+
"node-id": "openflow:1",
240+
"port": "openflow:1:4"
246241
}
247242
},
248243
{
249-
"link-id": "openflow:1:1",
244+
"link-id": "openflow:3:2",
250245
"dst-node": {
251246
"node-id": "openflow:0",
252247
"port": "openflow:0:0"
253248
},
254249
"src-node": {
255-
"node-id": "openflow:1",
256-
"port": "openflow:1:1"
250+
"node-id": "openflow:3",
251+
"port": "openflow:3:2"
257252
}
258253
},
259254
{
260-
"link-id": "openflow:2:1",
255+
"link-id": "openflow:4:1",
261256
"dst-node": {
262257
"node-id": "openflow:0",
263258
"port": "openflow:0:0"
264259
},
265260
"src-node": {
266-
"node-id": "openflow:2",
267-
"port": "openflow:2:1"
261+
"node-id": "openflow:4",
262+
"port": "openflow:4:1"
268263
}
269264
}
270265
]
271266
},
272267
{
273-
"id": "6",
274-
"type": "V",
275-
"matchfield": "IPv4_DST"
268+
"id": "1",
269+
"type": "T",
270+
"testfield": "IPv4_SRC"
276271
},
277272
{
278-
"id": "1",
279-
"type": "V",
280-
"matchfield": "IPv4_SRC"
273+
"id": "9",
274+
"type": "L",
275+
"action-type": "Flood"
281276
},
282277
{
283278
"id": "0",
284279
"type": "V",
285280
"matchfield": "ETH_TYPE"
286281
},
287-
{
288-
"id": "11",
289-
"type": "L",
290-
"action-type": "Flood"
291-
},
292282
{
293283
"id": "3",
294-
"type": "L",
295-
"action-type": "Path",
296-
"link": [
297-
{
298-
"link-id": "openflow:2:3",
299-
"dst-node": {
300-
"node-id": "openflow:0",
301-
"port": "openflow:0:0"
302-
},
303-
"src-node": {
304-
"node-id": "openflow:2",
305-
"port": "openflow:2:3"
306-
}
307-
},
308-
{
309-
"link-id": "openflow:3:1",
310-
"dst-node": {
311-
"node-id": "openflow:0",
312-
"port": "openflow:0:0"
313-
},
314-
"src-node": {
315-
"node-id": "openflow:3",
316-
"port": "openflow:3:1"
317-
}
318-
},
319-
{
320-
"link-id": "openflow:1:2",
321-
"dst-node": {
322-
"node-id": "openflow:0",
323-
"port": "openflow:0:0"
324-
},
325-
"src-node": {
326-
"node-id": "openflow:1",
327-
"port": "openflow:1:2"
328-
}
329-
}
330-
]
284+
"type": "T",
285+
"testfield": "TCP_DST_PORT"
331286
},
332287
{
333288
"id": "2",
334-
"type": "V",
335-
"matchfield": "IPv4_DST"
289+
"type": "T",
290+
"testfield": "IPv4_DST"
336291
}
337292
]
338293
}

utils/install.sh

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

3-
TAG=v0.2.1-alpha
4-
VERSION=0.2.1-alpha
3+
TAG=v0.2.2-alpha
4+
VERSION=0.2.2-alpha
55
MAPLE_ZIP=maple-$VERSION
66

77
function install_maple {
@@ -24,15 +24,7 @@ function install_maple_lib {
2424
unzip -o /tmp/m2.zip
2525
}
2626

27-
function install_maple_archetype {
28-
cd /tmp
29-
git clone https://github.com/snlab/maple-archetype.git -b $TAG
30-
cd maple-archetype
31-
mvn clean install -DskipTests
32-
}
33-
3427
install_maple
3528
install_maple_lib
36-
# install_maple_archetype
3729

3830

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.2.1-alpha
1+
v0.2.2-alpha

0 commit comments

Comments
 (0)