Skip to content

Commit

Permalink
Refactor network component props to file for usnistgov#1913
Browse files Browse the repository at this point in the history
As there will duplicate values when they really need to be identical and
the enum documentation strings were previously aligned, it is prudent to
refactor the reused enum values and doc strings using the shared entity
file pattern per other shared allowed-values enum sets in this model
definition and others.
  • Loading branch information
aj-stein-gsa committed Nov 19, 2024
1 parent 76c7fb6 commit e30b946
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/metaschema/oscal_implementation-common_metaschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<!ENTITY allowed-values-component_inventory-item_property-name SYSTEM "./shared-constraints/allowed-values-component_inventory-item_property-name.ent">
<!ENTITY allowed-values-component_component_link-rel SYSTEM "./shared-constraints/allowed-values-component_component_link-rel.ent">
<!ENTITY allowed-values-component-type SYSTEM "./shared-constraints/allowed-values-component-type.ent">
<!ENTITY allowed-values-property-name-networked-components SYSTEM "./shared-constraints/allowed-values-property-name-networked-components.ent">
]>
<METASCHEMA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://csrc.nist.gov/ns/oscal/metaschema/1.0" xsi:schemaLocation="http://csrc.nist.gov/ns/oscal/metaschema/1.0 ../../build/metaschema-xslt/support/metaschema/schema/xml/metaschema.xsd" abstract="yes">
Expand Down Expand Up @@ -192,16 +193,10 @@
<enum value="isa-title">Title of the Interconnection Security Agreement (ISA).</enum>
<enum value="isa-date">Date of the Interconnection Security Agreement (ISA).</enum>
<enum value="isa-remote-system-name">The name of the remote interconnected system.</enum>
<enum value="ipv4-address">The Internet Protocol Version 4 address is for an interconnection, service, or software component.</enum>
<enum value="ipv6-address">The Internet Protocol Version 6 address is for an interconnection, service, or software component.</enum>
<enum value="direction">The direction categorizes the network connectivity of an interconnection, service, or software component.</enum>
<enum value="uri">A Uniform Resource Identifier (URI) is for an interconnection, service, or software component.</enum>
&allowed-values-property-name-networked-components;
</allowed-values>
<allowed-values target="[@type=('service', 'software')]/prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name">
<enum value="ipv4-address">The Internet Protocol Version 4 address is for an interconnection, service, or software component.</enum>
<enum value="ipv6-address">The Internet Protocol Version 6 address is for an interconnection, service, or software component.</enum>
<enum value="direction">The direction categorizes the network connectivity of an interconnection, service, or software component.</enum>
<enum value="uri">A Uniform Resource Identifier (URI) is for an interconnection, service, or software component.</enum>
&allowed-values-property-name-networked-components;
</allowed-values>
<allowed-values target="prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name=('ipv4-address','ipv6-address')]/@class">
<enum value="local">The identified IP address is for this system.</enum>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<enum value="ipv4-address">The Internet Protocol Version 4 address is for an interconnection, service, or software component.</enum>
<enum value="ipv6-address">The Internet Protocol Version 6 address is for an interconnection, service, or software component.</enum>
<enum value="direction">The direction categorizes the network connectivity of an interconnection, service, or software component.</enum>
<enum value="uri">A Uniform Resource Identifier (URI) is for an interconnection, service, or software component.</enum>

0 comments on commit e30b946

Please sign in to comment.