diff --git a/mix.exs b/mix.exs index 7f76ebb..1062030 100644 --- a/mix.exs +++ b/mix.exs @@ -5,12 +5,13 @@ defmodule Tres.Mixfile do [ app: :tres, version: "0.1.0", - elixir: "~> 1.5", + elixir: "~> 1.8", start_permanent: Mix.env() == :prod, escript: [main_module: Openflow.EnumGen, name: :enum_gen, path: "bin/enum_gen"], compilers: [:erlang] ++ Mix.compilers(), deps: deps(), - aliases: [test: "test --no-start", compile: ["escript.build"]] + aliases: [test: "test --no-start", compile: ["escript.build"]], + docs: docs() ] end @@ -25,7 +26,77 @@ defmodule Tres.Mixfile do {:ranch, "~> 1.7.1"}, {:eovsdb, github: "shun159/eovsdb", branch: "master"}, {:jsone, github: "sile/jsone", tag: "1.4.6", override: true}, - {:epcap, github: "msantos/epcap", branch: "master", only: :test} + {:epcap, github: "msantos/epcap", branch: "master", only: :test}, + # Document + {:earmark, "~> 1.2.6", only: :dev, runtime: false}, + {:ex_doc, "~> 0.19", only: :dev, runtime: false} + ] + end + + defp docs do + [ + groups_for_modules: groups_for_modules(), + formatters: ["html"], + ] + end + + defp groups_for_modules do + [ + "Actions": [ + Openflow.Action.Output, + Openflow.Action.CopyTtlOut, + Openflow.Action.CopyTtlIn, + Openflow.Action.SetMplsTtl, + Openflow.Action.DecMplsTtl, + Openflow.Action.PushVlan, + Openflow.Action.PopVlan, + Openflow.Action.PushMpls, + Openflow.Action.PopMpls, + Openflow.Action.SetQueue, + Openflow.Action.Group, + Openflow.Action.SetNwTtl, + Openflow.Action.DecNwTtl, + Openflow.Action.SetField, + Openflow.Action.PushPbb, + Openflow.Action.PopPbb, + Openflow.Action.NxResubmit, + Openflow.Action.NxSetTunnel, + Openflow.Action.NxRegMove, + Openflow.Action.NxRegLoad, + Openflow.Action.NxNote, + Openflow.Action.NxSetTunnel64, + Openflow.Action.NxMultipath, + Openflow.Action.NxBundle, + Openflow.Action.NxBundleLoad, + Openflow.Action.NxResubmitTable, + Openflow.Action.NxOutputReg, + Openflow.Action.NxLearn, + Openflow.Action.NxExit, + Openflow.Action.NxDecTtl, + Openflow.Action.NxFinTimeout, + Openflow.Action.NxController, + Openflow.Action.NxDecTtlCntIds, + Openflow.Action.NxWriteMetadata, + Openflow.Action.NxPushMpls, + Openflow.Action.NxPopMpls, + Openflow.Action.NxStackPush, + Openflow.Action.NxStackPop, + Openflow.Action.NxSample, + Openflow.Action.NxOutputReg2, + Openflow.Action.NxRegLoad2, + Openflow.Action.NxConjunction, + Openflow.Action.NxConntrack, + Openflow.Action.NxNat, + Openflow.Action.NxController2, + Openflow.Action.NxSample2, + Openflow.Action.NxOutputTrunc, + Openflow.Action.NxGroup, + Openflow.Action.NxSample3, + Openflow.Action.NxClone, + Openflow.Action.NxCtClear, + Openflow.Action.NxResubmitTableCt, + Openflow.Action.NxLearn2 + ] ] end end diff --git a/mix.lock b/mix.lock index de362d2..d7fe73c 100644 --- a/mix.lock +++ b/mix.lock @@ -1,11 +1,16 @@ %{ "binpp": {:git, "https://github.com/jtendo/binpp.git", "64bd68d215d1a6cd35871e7c134d7fe2e46214ea", [branch: "master"]}, + "earmark": {:hex, :earmark, "1.2.6", "b6da42b3831458d3ecc57314dff3051b080b9b2be88c2e5aa41cd642a5b044ed", [:mix], [], "hexpm"}, "eovsdb": {:git, "https://github.com/shun159/eovsdb.git", "1ff1572708d72fd25631c681f2102407903252a3", [branch: "master"]}, "epcap": {:git, "https://github.com/msantos/epcap.git", "9566f0420a4dcf1292c1a1afd9339c35dbdfd041", [branch: "master"]}, + "ex_doc": {:hex, :ex_doc, "0.19.3", "3c7b0f02851f5fc13b040e8e925051452e41248f685e40250d7e40b07b9f8c10", [:mix], [{:earmark, "~> 1.2", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.10", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"}, "flow": {:hex, :flow, "0.12.0", "32c5a5f3ff6693e004b6c17a8c64dce2f8cdaf9564912d79427176013a586ab6", [], [{:gen_stage, "~> 0.12.0", [hex: :gen_stage, repo: "hexpm", optional: false]}], "hexpm"}, "gen_stage": {:hex, :gen_stage, "0.12.2", "e0e347cbb1ceb5f4e68a526aec4d64b54ad721f0a8b30aa9d28e0ad749419cbb", [:mix], [], "hexpm"}, "gen_state_machine": {:hex, :gen_state_machine, "2.0.1", "85efd5a0376929c3a4246dd943e17564a2908c7ddd7acd242d84594e785d83f8", [], [], "hexpm"}, "jsone": {:git, "https://github.com/sile/jsone.git", "b23d312a5ed051ea7ad0989a9f2cb1a9c3f9a502", [tag: "1.4.6"]}, + "makeup": {:hex, :makeup, "0.8.0", "9cf32aea71c7fe0a4b2e9246c2c4978f9070257e5c9ce6d4a28ec450a839b55f", [:mix], [{:nimble_parsec, "~> 0.5.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm"}, + "makeup_elixir": {:hex, :makeup_elixir, "0.13.0", "be7a477997dcac2e48a9d695ec730b2d22418292675c75aa2d34ba0909dcdeda", [:mix], [{:makeup, "~> 0.8", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm"}, + "nimble_parsec": {:hex, :nimble_parsec, "0.5.0", "90e2eca3d0266e5c53f8fbe0079694740b9c91b6747f2b7e3c5d21966bba8300", [:mix], [], "hexpm"}, "pkt": {:git, "https://github.com/msantos/pkt.git", "ff0e9a7d28cdae941bce935602cd252cad1ea296", [branch: "master"]}, "ranch": {:hex, :ranch, "1.7.1", "6b1fab51b49196860b733a49c07604465a47bdb78aa10c1c16a3d199f7f8c881", [:rebar3], [], "hexpm"}, "uuid": {:git, "https://github.com/avtobiff/erlang-uuid.git", "585c2474afb4a597ae8c8bf6d21e5a9c73f18e0b", [tag: "v0.5.0"]},