Skip to content

Commit

Permalink
[mock_uss/flight_planning] Exclude OVN from key when USS is down (int…
Browse files Browse the repository at this point in the history
  • Loading branch information
mickmis authored and Shastick committed Nov 17, 2023
1 parent 05bdd30 commit 01410d6
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 29 deletions.
11 changes: 10 additions & 1 deletion monitoring/mock_uss/f3548v21/flight_planning.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,11 @@ def get_down_uss_op_intent(
conflict, that way we can just retrieve the conflicting area instead of having to compute again the intersection
between the flight to be planned and the conflicting operational intent.
"""

# at that point the value of the OVN as it is returned by the DSS may be `Available from USS`, so we explicitly
# remove it so that it is excluded from the key
op_intent_ref.ovn = None

# USS is declared as down and does not answer for details : minimum - 1
if op_intent_ref.state == f3548_v21.OperationalIntentState.Accepted:
return f3548_v21.OperationalIntent(
Expand Down Expand Up @@ -437,7 +442,11 @@ def check_op_intent(
new_flight.op_intent, existing_flight, op_intents, locality, log
)

key = [f3548_v21.EntityOVN(op.reference.ovn) for op in op_intents]
key = [
f3548_v21.EntityOVN(op.reference.ovn)
for op in op_intents
if op.reference.ovn is not None
]
else:
# Flight is not nominal and therefore doesn't need to check intersections
key = []
Expand Down
6 changes: 5 additions & 1 deletion monitoring/uss_qualifier/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
lint: validate-docs

.PHONY: validate-docs
validate-docs:
validate-docs: check-no-cross-reference
./scripts/validate_test_definitions.sh
./scripts/format_test_suite_docs.sh --lint

.PHONY: check-no-cross-reference
check-no-cross-reference:
./scripts/check-netrid-cross-references.sh

.PHONY: format
format: format-documentation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ If the DSS fails to let us search in the area for which test subscriptions will

#### Subscription can be queried by ID check

If the DSS cannot be queried for the existing test ID, the DSS is likely not implementing **[astm.f3411.v19.DSS0030,e](../../../../../requirements/astm/f3411/v19.md)** correctly.
If the DSS cannot be queried for the existing test ID, the DSS is likely not implementing **[astm.f3411.v22a.DSS0030,e](../../../../../requirements/astm/f3411/v22a.md)** correctly.

#### Subscription can be deleted check

Expand Down Expand Up @@ -390,7 +390,7 @@ The cleanup phase of this test scenario removes the subscription with the known

#### Subscription can be queried by ID check

If the DSS cannot be queried for the existing test ID, the DSS is likely not implementing **[astm.f3411.v19.DSS0030,e](../../../../../requirements/astm/f3411/v19.md)** correctly.
If the DSS cannot be queried for the existing test ID, the DSS is likely not implementing **[astm.f3411.v22a.DSS0030,e](../../../../../requirements/astm/f3411/v22a.md)** correctly.

#### Subscription can be deleted check

Expand Down
24 changes: 24 additions & 0 deletions monitoring/uss_qualifier/scripts/check-netrid-cross-references.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash

# Check for 'v19' references in netrid v22a scenario documents
filesv22a=$(find ./scenarios/astm/netrid/v22a -name '*.md' -exec grep -l 'v19' {} +)
if [ -n "$filesv22a" ]; then
echo "Error: Found netrid v22a scenario document containing a 'v19' reference:"
echo "$filesv22a"
error_found=true
fi

# Check for 'v22a' references in netrid v19 scenario documents
filesv19=$(find ./scenarios/astm/netrid/v19 -name '*.md' -exec grep -l 'v22a' {} +)
if [ -n "$filesv19" ]; then
echo "Error: Found netrid v19 scenario document containing a 'v22a' reference:"
echo "$filesv19"
error_found=true
fi

# Error if we found any file
if [ "$error_found" = true ]; then
exit 1
fi
# Otherwise all is good
exit 0
7 changes: 1 addition & 6 deletions monitoring/uss_qualifier/suites/astm/netrid/f3411_22a.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<th><a href="../../README.md#checked-in">Checked in</a></th>
</tr>
<tr>
<td rowspan="4" style="vertical-align:top;"><a href="../../../requirements/astm/f3411/v19.md">astm<br>.f3411<br>.v19</a></td>
<td rowspan="3" style="vertical-align:top;"><a href="../../../requirements/astm/f3411/v19.md">astm<br>.f3411<br>.v19</a></td>
<td><a href="../../../requirements/astm/f3411/v19.md">DSS0030,a</a></td>
<td>Implemented</td>
<td><a href="../../../scenarios/astm/netrid/v19/dss/token_validation.md">ASTM NetRID DSS: Token Validation</a></td>
Expand All @@ -31,11 +31,6 @@
<td>Implemented</td>
<td><a href="../../../scenarios/astm/netrid/v19/dss/token_validation.md">ASTM NetRID DSS: Token Validation</a></td>
</tr>
<tr>
<td><a href="../../../requirements/astm/f3411/v19.md">DSS0030,e</a></td>
<td>Implemented</td>
<td><a href="../../../scenarios/astm/netrid/v22a/dss/subscription_simple.md">ASTM NetRID DSS: Subscription Simple</a></td>
</tr>
<tr>
<td><a href="../../../requirements/astm/f3411/v19.md">NET0730</a></td>
<td>Implemented</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<th><a href="../../../README.md#checked-in">Checked in</a></th>
</tr>
<tr>
<td rowspan="4" style="vertical-align:top;"><a href="../../../../requirements/astm/f3411/v19.md">astm<br>.f3411<br>.v19</a></td>
<td rowspan="3" style="vertical-align:top;"><a href="../../../../requirements/astm/f3411/v19.md">astm<br>.f3411<br>.v19</a></td>
<td><a href="../../../../requirements/astm/f3411/v19.md">DSS0030,a</a></td>
<td>Implemented</td>
<td><a href="../../../../scenarios/astm/netrid/v19/dss/token_validation.md">ASTM NetRID DSS: Token Validation</a></td>
Expand All @@ -34,11 +34,6 @@
<td>Implemented</td>
<td><a href="../../../../scenarios/astm/netrid/v19/dss/token_validation.md">ASTM NetRID DSS: Token Validation</a></td>
</tr>
<tr>
<td><a href="../../../../requirements/astm/f3411/v19.md">DSS0030,e</a></td>
<td>Implemented</td>
<td><a href="../../../../scenarios/astm/netrid/v22a/dss/subscription_simple.md">ASTM NetRID DSS: Subscription Simple</a></td>
</tr>
<tr>
<td><a href="../../../../requirements/astm/f3411/v19.md">NET0730</a></td>
<td>Implemented</td>
Expand Down
2 changes: 1 addition & 1 deletion monitoring/uss_qualifier/suites/interuss/dss/all_tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<tr>
<td><a href="../../../requirements/astm/f3411/v19.md">DSS0030,e</a></td>
<td>Implemented</td>
<td><a href="../../../scenarios/astm/netrid/v22a/dss/subscription_simple.md">ASTM NetRID DSS: Subscription Simple</a></td>
<td><a href="../../../scenarios/astm/netrid/v19/dss/subscription_simple.md">ASTM NetRID DSS: Subscription Simple</a></td>
</tr>
<tr>
<td><a href="../../../requirements/astm/f3411/v19.md">DSS0030,f</a></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<th><a href="../README.md#checked-in">Checked in</a></th>
</tr>
<tr>
<td rowspan="4" style="vertical-align:top;"><a href="../../requirements/astm/f3411/v19.md">astm<br>.f3411<br>.v19</a></td>
<td rowspan="3" style="vertical-align:top;"><a href="../../requirements/astm/f3411/v19.md">astm<br>.f3411<br>.v19</a></td>
<td><a href="../../requirements/astm/f3411/v19.md">DSS0030,a</a></td>
<td>Implemented</td>
<td><a href="../../scenarios/astm/netrid/v19/dss/token_validation.md">ASTM NetRID DSS: Token Validation</a></td>
Expand All @@ -26,11 +26,6 @@
<td>Implemented</td>
<td><a href="../../scenarios/astm/netrid/v19/dss/token_validation.md">ASTM NetRID DSS: Token Validation</a></td>
</tr>
<tr>
<td><a href="../../requirements/astm/f3411/v19.md">DSS0030,e</a></td>
<td>Implemented</td>
<td><a href="../../scenarios/astm/netrid/v22a/dss/subscription_simple.md">ASTM NetRID DSS: Subscription Simple</a></td>
</tr>
<tr>
<td><a href="../../requirements/astm/f3411/v19.md">NET0730</a></td>
<td>Implemented</td>
Expand Down
7 changes: 1 addition & 6 deletions monitoring/uss_qualifier/suites/uspace/required_services.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<th><a href="../README.md#checked-in">Checked in</a></th>
</tr>
<tr>
<td rowspan="4" style="vertical-align:top;"><a href="../../requirements/astm/f3411/v19.md">astm<br>.f3411<br>.v19</a></td>
<td rowspan="3" style="vertical-align:top;"><a href="../../requirements/astm/f3411/v19.md">astm<br>.f3411<br>.v19</a></td>
<td><a href="../../requirements/astm/f3411/v19.md">DSS0030,a</a></td>
<td>Implemented</td>
<td><a href="../../scenarios/astm/netrid/v19/dss/token_validation.md">ASTM NetRID DSS: Token Validation</a></td>
Expand All @@ -28,11 +28,6 @@
<td>Implemented</td>
<td><a href="../../scenarios/astm/netrid/v19/dss/token_validation.md">ASTM NetRID DSS: Token Validation</a></td>
</tr>
<tr>
<td><a href="../../requirements/astm/f3411/v19.md">DSS0030,e</a></td>
<td>Implemented</td>
<td><a href="../../scenarios/astm/netrid/v22a/dss/subscription_simple.md">ASTM NetRID DSS: Subscription Simple</a></td>
</tr>
<tr>
<td><a href="../../requirements/astm/f3411/v19.md">NET0730</a></td>
<td>Implemented</td>
Expand Down

0 comments on commit 01410d6

Please sign in to comment.