Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[uss_qualifier] DSS0210,2 check op-intent references are synchronized #530

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions monitoring/monitorlib/schema_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ class F3548_21(str, Enum):
QuerySubscriptionsResponse = "components.schemas.QuerySubscriptionsResponse"
DeleteSubscriptionResponse = "components.schemas.DeleteSubscriptionResponse"

ChangeOperationalIntentReferenceResponse = (
"components.schemas.ChangeOperationalIntentReferenceResponse"
)
GetOperationalIntentReferenceResponse = (
"components.schemas.GetOperationalIntentReferenceResponse"
)
QueryOperationalIntentReferenceResponse = (
"components.schemas.QueryOperationalIntentReferenceResponse"
)


_openapi_content_cache: Dict[str, dict] = {}

Expand Down
2 changes: 1 addition & 1 deletion monitoring/prober/infrastructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def wrapper_default_scope(*args, **kwargs):
resource_type_code_descriptions: Dict[ResourceType, str] = {}


# Next code: 381
# Next code: 382
def register_resource_type(code: int, description: str) -> ResourceType:
"""Register that the specified code refers to the described resource.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ v1:
dss_instances: dss_instances
mock_uss: mock_uss
second_utm_auth: second_utm_auth
utm_client_identity: utm_client_identity
planning_area: planning_area
problematically_big_area: problematically_big_area

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ v1:
dss_instances: scd_dss_instances
id_generator: id_generator
second_utm_auth: second_utm_auth
utm_client_identity: utm_client_identity
planning_area: che_planning_area
problematically_big_area: che_problematically_big_area
execution:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ImplicitSubscriptionParameters,
)

from monitoring.monitorlib.geo import make_latlng_rect, Volume3D
from monitoring.monitorlib.geo import LatLngPoint, make_latlng_rect, Volume3D, Polygon
from monitoring.monitorlib.geotemporal import Volume4D
from monitoring.monitorlib.temporal import Time
from monitoring.uss_qualifier.resources.astm.f3548.v21.subscription_params import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ This page describes the content of a common test step that ensures a clean works

## 🛑 Operational intent references can be queried by ID check

If an existing operational intent reference cannot directly be queried by its ID, the DSS implementation is in violation of
**[astm.f3548.v21.DSS0005,1](../../../../requirements/astm/f3548/v21.md)**.
If an existing operational intent reference cannot directly be queried by its ID, or if for a non-existing one the DSS replies with a status code different than 404,
the DSS implementation is in violation of **[astm.f3548.v21.DSS0005,1](../../../../requirements/astm/f3548/v21.md)**.

## 🛑 Operational intent references can be searched for check

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ The response to a successful get operational intent reference query is expected

If it does not, the DSS is failing to implement **[astm.f3548.v21.DSS0005,1](../../../../../../../requirements/astm/f3548/v21.md)**.

## 🛑 Get operational intent reference response content is correct check

A successful operational intent reference creation query is expected to return a body, the content of which reflects an operational intent reference that was created earlier.
If the content of the response does not correspond to what was requested, the DSS is failing to implement **[astm.f3548.v21.DSS0005,1](../../../../../../../requirements/astm/f3548/v21.md)**.

This check will usually be performing a series of sub-checks from the [validate](../validate) fragments.

## 🛑 Successful operational intent reference search query check

If the DSS fails to let us search in the area for which the OIR was created, it is failing to meet **[astm.f3548.v21.DSS0005,1](../../../../../../../requirements/astm/f3548/v21.md)**.
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .subscription_synchronization import SubscriptionSynchronization
from .op_intent_ref_synchronization import OIRSynchronization
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# ASTM SCD DSS: Operational Intent Reference Synchronization test scenario

## Overview

Verifies that all CRUD operations on operational intent references performed on a given DSS instance
are properly propagated to every other DSS instance participating in the deployment.

## Resources

### dss

[`DSSInstanceResource`](../../../../../resources/astm/f3548/v21/dss.py) the DSS instance through which entities are created, modified and deleted.

### other_instances

[`DSSInstancesResource`](../../../../../resources/astm/f3548/v21/dss.py) pointing to the DSS instances used to confirm that entities are properly propagated.

### id_generator

[`IDGeneratorResource`](../../../../../resources/interuss/id_generator.py) providing the Subscription ID for this scenario.

### planning_area

[`PlanningAreaResource`](../../../../../resources/astm/f3548/v21/planning_area.py) describes the 3D volume in which subscriptions will be created.

### client_identity

[`ClientIdentityResource`](../../../../../resources/communications/client_identity.py) to be used for this scenario.

## Setup test case

### [Ensure clean workspace test step](../clean_workspace.md)

This step ensures that no subscription with the known test ID exists in the DSS.

## OIR synchronization test case

This test case creates an operational intent reference on the main DSS, and verifies that it is properly synchronized to the other DSS instances.

It then goes on to mutate and delete it, each time confirming that all other DSSes return the expected results.

### Create OIR validation test step

#### [Create OIR](../fragments/oir/crud/create.md)

Verify that an operational intent reference can be created on the primary DSS.

#### [OIR Content is correct](../fragments/oir/validate/correctness.md)

Verify that the operational intent reference returned by the DSS under test is properly formatted and contains the expected content.

### Query newly created OIR test step

Query the created operational intent at every DSS provided in `dss_instances`.

#### [OIR is synchronized](../fragments/oir/sync.md)

Confirm that the operational intent reference that was just created is properly synchronized across all DSS instances.

#### [Get OIR](../fragments/oir/crud/read.md)

Confirms that each DSS provides access to the created operational intent reference,

#### [OIR Content is correct](../fragments/oir/validate/correctness.md)

Verify that the operational intent reference returned by every DSS is correctly formatted and corresponds to what was created earlier.

#### [OIR Versions are correct](../fragments/oir/validate/non_mutated.md)

Verify that the operational intent reference's version fields are as expected.

### Mutate OIR test step

This test step mutates the previously created operational intent reference to verify that the DSS reacts properly: notably, it checks that the operational intent reference version is updated,
including for changes that are not directly visible, such as changing the operational intent reference's footprint.

#### [Update OIR](../fragments/oir/crud/update.md)

Confirm that the operational intent reference can be mutated.

#### [Validate OIR](../fragments/oir/validate/correctness.md)

Verify that the operational intent reference returned by the DSS is properly formatted and contains the correct content.

#### [OIR Versions are correct](../fragments/oir/validate/mutated.md)

Verify that the operational intent reference's version fields have been updated.

### Query updated OIR test step

Query the updated operational intent reference at every DSS provided in `dss_instances`.

#### [OIR is synchronized](../fragments/oir/sync.md)

Confirm that the operational intent reference that was just mutated is properly synchronized across all DSS instances.

#### [Get OIR](../fragments/oir/crud/read.md)

Confirms that the operational intent reference that was just mutated can be retrieved from any DSS.

#### [Validate OIR](../fragments/oir/validate/correctness.md)

Verify that the operational intent reference returned by every DSS is correctly formatted and corresponds to what was mutated earlier.

#### [OIR Versions are correct](../fragments/oir/validate/non_mutated.md)

Verify that the operational intent reference's version fields are as expected.

### Delete OIR test step

Attempt to delete the operational intent reference in various ways and ensure that the DSS reacts properly.

This also checks that the operational intent reference data returned by a successful deletion is correct.

#### [Delete OIR](../fragments/oir/crud/delete.md)

Confirms that an operational intent reference can be deleted.

#### [Validate OIR](../fragments/oir/validate/correctness.md)

Verify that the operational intent reference returned by the DSS via the deletion is properly formatted and contains the correct content.

#### [OIR Versions are correct](../fragments/oir/validate/non_mutated.md)

Verify that the operational intent reference's version fields are as expected.

### Query deleted OIR test step

Attempt to query and search for the deleted operational intent reference in various ways

#### 🛑 Secondary DSS should not return the deleted operational intent reference check

If a DSS returns an operational intent reference that was previously successfully deleted from the primary DSS,
either one of the primary DSS or the DSS that returned the operational intent reference is in violation of **[astm.f3548.v21.DSS0210,2a](../../../../../requirements/astm/f3548/v21.md)**.

## [Cleanup](../clean_workspace.md)
Loading
Loading