Skip to content
Snippets Groups Projects
Commit da127699 authored by Ryan Izard's avatar Ryan Izard
Browse files

Merge pull request #526 from electricjay/patch-1

update formatting of README.md
parents c9b02dab e923c819
No related branches found
No related tags found
No related merge requests found
...@@ -23,39 +23,41 @@ One of the key features of Floodlight v1.1 is its full support for OpenFlow 1.0 ...@@ -23,39 +23,41 @@ One of the key features of Floodlight v1.1 is its full support for OpenFlow 1.0
To best demonstrate the extent to which constructing and working with OpenFlow concepts such as FlowMods has been improved in Floodlight v1.0, consider the following before and after example. To best demonstrate the extent to which constructing and working with OpenFlow concepts such as FlowMods has been improved in Floodlight v1.0, consider the following before and after example.
/* Pre-v1.0 -- the old way to compose an OFFlowMod */ **Pre-v1.0 -- the old way to compose an OFFlowMod**
OFFlowMod flow = new OFFlowMod(); // no builder pattern; not immutable
OFMatch match = new OFMatch(); OFFlowMod flow = new OFFlowMod(); // no builder pattern; not immutable
ArrayList<OFAction> actions = new ArrayList<OFAction>(); OFMatch match = new OFMatch();
OFActionOutput outputAction = new OFActionOutput(); ArrayList<OFAction> actions = new ArrayList<OFAction>();
match.setInputPort((short) 1); // not type-safe; many OpenFlow concepts are represented as shorts OFActionOutput outputAction = new OFActionOutput();
match.setDataLayerType(Ethernet.TYPE_IPv4); match.setInputPort((short) 1); // not type-safe; many OpenFlow concepts are represented as shorts
match.setWildcards(Wildcards.FULL.matchOn(Flag.IN_PORT).matchOn(Flag.DL_TYPE)); // wildcarding necessary match.setDataLayerType(Ethernet.TYPE_IPv4);
outputAction.setType(OFActionType.OUTPUT); match.setWildcards(Wildcards.FULL.matchOn(Flag.IN_PORT).matchOn(Flag.DL_TYPE)); // wildcarding necessary
outputAction.setPort((short) 2); // raw types used; casting required outputAction.setType(OFActionType.OUTPUT);
outputAction.setLength((short) OFActionOutput.MINIMUM_LENGTH); outputAction.setPort((short) 2); // raw types used; casting required
actions(outputAction); outputAction.setLength((short) OFActionOutput.MINIMUM_LENGTH);
flow.setBufferId(-1); actions(outputAction);
flow.setActions(actions); flow.setBufferId(-1);
flow.setMatch(match); flow.setActions(actions);
flow.setLengthU(OFFlowMod.MINIMUM_LENGTH + outputAction.getLengthU()); // length must be set correctly flow.setMatch(match);
sw.write(flow); flow.setLengthU(OFFlowMod.MINIMUM_LENGTH + outputAction.getLengthU()); // length must be set correctly
sw.write(flow);
/* Floodlight v1.0, v1.1 -- the new and improved way to compose an OFFlowMod */
ArrayList<OFAction> actions = new ArrayList<OFAction(); **Floodlight v1.0, v1.1 -- the new and improved way to compose an OFFlowMod**
actions.add(myFactory.actions().buildOutput() // builder pattern used throughout
.setPort(OFPort.of(1)) // raw types replaced with objects for type-checking and readability ArrayList<OFAction> actions = new ArrayList<OFAction();
.build()); // list of immutable OFAction objects actions.add(myFactory.actions().buildOutput() // builder pattern used throughout
OFFlowAdd flow = myFactory.buildFlowAdd() .setPort(OFPort.of(1)) // raw types replaced with objects for type-checking and readability
.setMatch(myfactory.buildMatch() .build()); // list of immutable OFAction objects
.setExact(MatchField.IN_PORT, OFPort.of(1)) // type-checked matching OFFlowAdd flow = myFactory.buildFlowAdd()
.setExact(MatchField.ETH_TYPE, EthType.IPv4)) .setMatch(myfactory.buildMatch()
.build()) // immutable Match object .setExact(MatchField.IN_PORT, OFPort.of(1)) // type-checked matching
.setActions(actions) .setExact(MatchField.ETH_TYPE, EthType.IPv4))
.setOutPort(OFPort.of(2)) .build()) // immutable Match object
.setBufferId(OFBufferId.NO_BUFFER) .setActions(actions)
.build(); // immutable OFFlowMod; no lengths to set; no wildcards to set .setOutPort(OFPort.of(2))
sw.write(flow); .setBufferId(OFBufferId.NO_BUFFER)
.build(); // immutable OFFlowMod; no lengths to set; no wildcards to set
sw.write(flow);
Some of the concepts above will be discussed further below, but the major items to note are the use of the builder design pattern for ease-of-use and the production of immutable objects, the use of objects instead of raw types to enforce type-safe coding and to produce more readable code, built-in wildcarding, and finally there is no need to deal with message lengths. Some of the concepts above will be discussed further below, but the major items to note are the use of the builder design pattern for ease-of-use and the production of immutable objects, the use of objects instead of raw types to enforce type-safe coding and to produce more readable code, built-in wildcarding, and finally there is no need to deal with message lengths.
...@@ -69,47 +71,51 @@ For more information on how to use the new APIs exposed in Floodlight v1.1, plea ...@@ -69,47 +71,51 @@ For more information on how to use the new APIs exposed in Floodlight v1.1, plea
There are many more minor details, which can be found in the release notes. I have been grateful to have the support of many Floodlight developers, and together we have worked to provide the highest quality release within a reasonable time frame. I would especially like to thank the following individuals and beta testers for their code contributions and debugging efforts: There are many more minor details, which can be found in the release notes. I have been grateful to have the support of many Floodlight developers, and together we have worked to provide the highest quality release within a reasonable time frame. I would especially like to thank the following individuals and beta testers for their code contributions and debugging efforts:
Rui Cardoso * Rui Cardoso
Hung-Wei Chiu * Hung-Wei Chiu
Rich Lane * Rich Lane
Qingxiang Lin * Qingxiang Lin
Sanjivini Naikar * Sanjivini Naikar
Jason Paraga * Jason Paraga
Naveen Sampath * Naveen Sampath
Rob Sherwood * Rob Sherwood
Sebastian Szwaczyk * Sebastian Szwaczyk
KC Wang * KC Wang
Andreas Wundsam * Andreas Wundsam
electricjay * electricjay
Pengfei (Alex) Lu * Pengfei (Alex) Lu
Based on further community feedback, there will be minor releases to address any issues found or enhancements anyone would like to contribute. The mailing list has seen quite an uptick in activity over the last few months! Based on further community feedback, there will be minor releases to address any issues found or enhancements anyone would like to contribute. The mailing list has seen quite an uptick in activity over the last few months!
If at any time you have a question or concern, please reach out to us. We rely on our fellow developers to make the most effective improvements and find any bugs. Thank you all for the support and I hope you find your work with Floodlight v1.1 fun and productive! If at any time you have a question or concern, please reach out to us. We rely on our fellow developers to make the most effective improvements and find any bugs. Thank you all for the support and I hope you find your work with Floodlight v1.1 fun and productive!
Happy coding! Happy coding!
Ryan Izard Ryan Izard
ryan.izard@bigswitch.com ryan.izard@bigswitch.com
rizard@g.clemson.edu rizard@g.clemson.edu
Floodlight v1.1 can be found on GitHub at: Floodlight v1.1 can be found on GitHub at:
http://github.com/floodlight/floodlight/tree/v1.1. http://github.com/floodlight/floodlight/tree/v1.1.
Any updates leading up to a minor release after v1.1 will be placed in master at:
Any updates leading up to a minor release after v1.1 will be placed in master at:
http://github.com/floodlight/floodlight. http://github.com/floodlight/floodlight.
And finally all "bleeding edge" updates will be in my repository's master branch at:
And finally all "bleeding edge" updates will be in my repository's master branch at:
http://github.com/rizard/floodlight. http://github.com/rizard/floodlight.
If you need an older version of Floodlight for any reason, they can still be found on GitHub: If you need an older version of Floodlight for any reason, they can still be found on GitHub:
Floodlight v1.0 can be found on GitHub at:
http://github.com/floodlight/floodlight/tree/v1.0 Floodlight v1.0 can be found on GitHub at:
Floodlight v0.91 (old master) can be found at: http://github.com/floodlight/floodlight/tree/v1.0
Floodlight v0.91 (old master) can be found at:
https://github.com/floodlight/floodlight/tree/v0.91 https://github.com/floodlight/floodlight/tree/v0.91
Floodlight v0.90 can be found at:
Floodlight v0.90 can be found at:
https://github.com/floodlight/floodlight/tree/v0.90 https://github.com/floodlight/floodlight/tree/v0.90
To download a pre-built VM appliance, access documentation, and sign up for the mailing list, go to: To download a pre-built VM appliance, access documentation, and sign up for the mailing list, go to:
http://www.projectfloodlight.org/floodlight http://www.projectfloodlight.org/floodlight
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment