Skip to content

Commit

Permalink
Port range constraints re-written to eliminate the error docuemnted i…
Browse files Browse the repository at this point in the history
…n issue #290.
  • Loading branch information
Michaela Iorga authored and iMichaela committed Jul 2, 2024
1 parent 7b593f5 commit 751e2d7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/metaschema/oscal_implementation-common_metaschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@
</constraint>
</define-flag>
<!-- Added Contraints as Warnings -->
<constraint>
<!-- constraint>
<expect level="WARNING" id="port-range-start-and-end-not-specified" target="." test="exists(@start) and exists(@end)">
<message>If a protocol is defined, it should include a start and end port range. To define a single port, the start and end should be the same value.</message>
</expect>
Expand All @@ -318,6 +318,17 @@
<expect level="WARNING" id="port-range-end-date-is-before-start-date" target="." test="@start &lt;= @end">
<message>The port range specified has an end port that is less than the start port.</message>
</expect>
</constraint -->
<constraint>
<expect level="WARNING" target="." test="exists(@start)" id="port-range-has-start">
<message>A port range should have a start port given.</message>
</expect>
<expect level="WARNING" target="." test="exists(@end)" id="port-range-has-end">
<message>A port range should have an end port given. To define a single port, the start and end should be the same value.</message>
</expect>
<expect level="WARNING" target="." test="not(@start > @end)" id="port-range-starts-before-end">
<message>The port range start should not be after its end.</message>
</expect>
</constraint>
<remarks>
<p>To be validated as a natural number (integer &gt;= 1). A single port uses the same value for start and end. Use multiple 'port-range' entries for non-contiguous ranges.</p>
Expand Down

0 comments on commit 751e2d7

Please sign in to comment.