ditched kwalify for python with jsonschema and pyyaml.
This commit is contained in:
parent
67485f775a
commit
e921420dfc
|
@ -2,14 +2,7 @@
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="208c8f22-eeea-487d-8a23-c2fce1eb1434" name="Default" comment="">
|
<list default="true" id="208c8f22-eeea-487d-8a23-c2fce1eb1434" name="Default" comment="">
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/protocols/osi1-2/arp.yml" afterPath="$PROJECT_DIR$/protocols/osi1-2/arp.yml" />
|
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/protocols/osi1-2/eth-frame.yml" afterPath="$PROJECT_DIR$/protocols/osi1-2/eth-frame.yml" />
|
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/protocols/osi1-2/eth-packet.yml" afterPath="$PROJECT_DIR$/protocols/osi1-2/eth-packet.yml" />
|
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/protocols/osi3/icmpv4.yml" afterPath="$PROJECT_DIR$/protocols/osi3/icmpv4.yml" />
|
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/protocols/osi3/ipv4.yml" afterPath="$PROJECT_DIR$/protocols/osi3/ipv4.yml" />
|
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/schema.yml" afterPath="$PROJECT_DIR$/schema.yml" />
|
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/validate.py" afterPath="$PROJECT_DIR$/validate.py" />
|
|
||||||
</list>
|
</list>
|
||||||
<ignored path="npd.iws" />
|
<ignored path="npd.iws" />
|
||||||
<ignored path=".idea/workspace.xml" />
|
<ignored path=".idea/workspace.xml" />
|
||||||
|
|
10
README.md
10
README.md
|
@ -23,11 +23,17 @@ Simple, isn't it?
|
||||||
How to add a new protocol
|
How to add a new protocol
|
||||||
----
|
----
|
||||||
|
|
||||||
|
Requirements:
|
||||||
|
- Python 3.5
|
||||||
|
- jsonschema
|
||||||
|
- PyYaml
|
||||||
|
- (the old kwalify schemas are still present, but deprecated.)
|
||||||
|
|
||||||
|
Howto:
|
||||||
- Clone.
|
- Clone.
|
||||||
- Install ruby+[kwalify](http://www.kuwata-lab.com/kwalify/) (gem install kwalify).
|
|
||||||
- Check structure-schema.yml.
|
- Check structure-schema.yml.
|
||||||
- Write protocol file in ./protocols/osi[layer]/[protocolname].yml.
|
- Write protocol file in ./protocols/osi[layer]/[protocolname].yml.
|
||||||
- Validate structure with 'kwalify -lf structure-schema.yml [path/to/protocolname].yml' or validate all at once with 'kwalify -lf structure-schema.yml ./protocols/osi*/*.yml'.
|
- Validate structure with 'python validate.py -f [path/to/protocolname].yml' or all at once with 'python validate.py --all'
|
||||||
- Set up a merge request.
|
- Set up a merge request.
|
||||||
- Be happy.
|
- Be happy.
|
||||||
|
|
||||||
|
|
Reference in New Issue