blob: 87eee29dda9266abc4f7585266d69d3bcee7dfbf [file] [log] [blame]
Rich Lanec9fc57d2013-05-16 16:39:12 -07001-- binary
204 0f # version, type
300 70 # length
412 34 56 78 # xid
500 01 # command
603 # group_type
700 # pad
800 00 00 05 # group_id
900 30 # buckets[0].len
1000 01 # buckets[0].weight
1100 00 00 05 # buckets[0].watch_port
12ff ff ff ff # buckets[0].watch_group
1300 00 00 00 # pad
1400 00 # buckets[0].actions[0].type
1500 10 # buckets[0].actions[0].len
1600 00 00 05 # buckets[0].actions[0].port
1700 00 # buckets[0].actions[0].max_len
1800 00 00 00 00 00 # pad
1900 00 # buckets[0].actions[1].type
2000 10 # buckets[0].actions[1].len
2100 00 00 06 # buckets[0].actions[1].port
2200 00 # buckets[0].actions[1].max_len
2300 00 00 00 00 00 # pad
2400 30 # buckets[1].len
2500 01 # buckets[1].weight
2600 00 00 06 # buckets[1].watch_port
27ff ff ff ff # buckets[1].watch_group
2800 00 00 00 # pad
2900 00 # buckets[1].actions[0].type
3000 10 # buckets[1].actions[0].len
3100 00 00 05 # buckets[1].actions[0].port
3200 00 # buckets[1].actions[0].max_len
3300 00 00 00 00 00 # pad
3400 00 # buckets[1].actions[1].type
3500 10 # buckets[1].actions[1].len
3600 00 00 06 # buckets[1].actions[1].port
3700 00 # buckets[1].actions[1].max_len
3800 00 00 00 00 00 # pad
39-- python
Andreas Wundsam5812cf32013-11-15 13:51:24 -080040ofp.message.group_modify(
Rich Lanec9fc57d2013-05-16 16:39:12 -070041 xid=0x12345678,
Rich Lanec9fc57d2013-05-16 16:39:12 -070042 group_type=ofp.OFPGT_FF,
43 group_id=5,
44 buckets=[
45 ofp.bucket(
46 weight=1,
47 watch_port=5,
48 watch_group=0xffffffff,
49 actions=[
50 ofp.action.output(port=5, max_len=0),
51 ofp.action.output(port=6, max_len=0)]),
52 ofp.bucket(
53 weight=1,
54 watch_port=6,
55 watch_group=0xffffffff,
56 actions=[
57 ofp.action.output(port=5, max_len=0),
58 ofp.action.output(port=6, max_len=0)])])
Andreas Wundsam5812cf32013-11-15 13:51:24 -080059-- java
60 OFActions actions = factory.actions();
61 builder
62 .setXid(0x12345678)
63 .setGroupType(OFGroupType.FF)
64 .setGroup(OFGroup.of(5))
65 .setBuckets(ImmutableList.<OFBucket>of(
66 factory.buildBucket()
67 .setWeight(1)
68 .setWatchPort(OFPort.of(5))
69 .setWatchGroup(OFGroup.ANY)
70 .setActions(ImmutableList.<OFAction>of(
71 actions.output(OFPort.of(5), 0),
72 actions.output(OFPort.of(6), 0)
73 ))
74 .build(),
75 factory.buildBucket()
76 .setWeight(1)
77 .setWatchPort(OFPort.of(6))
78 .setWatchGroup(OFGroup.ANY)
79 .setActions(ImmutableList.<OFAction>of(
80 actions.output(OFPort.of(5), 0),
81 actions.output(OFPort.of(6), 0)
82 ))
83 .build()
84 )
85 )
86 .build();