Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ jobs:
with:
name: uss_qualifier-utm_implementation_us-test
script: |
export CONFIG_NAME="configurations.dev.utm_implementation_us"
export CONFIG_NAME="configurations.dev.utm_implementation_us.environments.local.test_1"

cd monitoring/uss_qualifier
make test
Expand Down
2 changes: 1 addition & 1 deletion monitoring/mock_uss/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ services:
- MOCK_USS_PUBLIC_KEY=/var/test-certs/auth2.pem
- MOCK_USS_TOKEN_AUDIENCE=scdsc.log.uss6.localutm,localhost,host.docker.internal
- MOCK_USS_BASE_URL=http://scdsc.log.uss6.localutm
- MOCK_USS_SERVICES=scdsc,interaction_logging,flight_planning
- MOCK_USS_SERVICES=scdsc,interaction_logging,flight_planning,versioning
- MOCK_USS_INTERACTIONS_LOG_DIR=output/scdsc_interaction_logs
- MOCK_USS_PORT=80
- MOCK_USS_PROXY_VALUES=x_for=1,x_proto=1,x_host=1,x_prefix=1,x_port=1
Expand Down
2 changes: 1 addition & 1 deletion monitoring/monitorlib/locality.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ def lowest_bound_priority(self) -> int:
return -1

def highest_priority(self) -> int:
return 0 # as of the time of writing this, this value has not been subject to a firm decision
return 100
6 changes: 3 additions & 3 deletions monitoring/uss_qualifier/configurations/dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ Verifies requirements for U-space Service Providers using ASTM standards (F3411-

Same configuration as [uspace](#uspace), except only the portions related to ASTM F3548-21 verification are executed (other parts are skipped).

## [utm_implementation_us](utm_implementation_us.jsonnet)
## [utm_implementation_us](utm_implementation_us)

Intended to be an InterUSS interpretation of how to verify the requirements of the [US Shared Airspace group](https://github.com/utmimplementationus/getstarted) verified via automated testing as documented in their [Requirements Traceability Matrix for Strategic Coordination](https://github.com/utmimplementationus/getstarted/blob/main/docs/Strategic_Coordination_Compliance_Matrix_v1.0.xlsx). Note that this is merely InterUSS's interpretation of the publicly-available information for that project and this test configuration may not exactly match the test configuration actually in use by that group (which is not organizationally affiliated with InterUSS). InterUSS welcomes contributions to change this test configuration to better align with the intent of that group.
Intended to be an InterUSS interpretation of how to verify the requirements of the [US Shared Airspace group](https://github.com/utmimplementationus/getstarted) verified via automated testing as documented in their [Requirements Traceability Matrix for Strategic Coordination](https://github.com/utmimplementationus/getstarted/blob/main/docs). Note that this is merely InterUSS's interpretation of the publicly-available information for that project and this test configuration may not exactly match the test configuration actually in use by that group (which is not organizationally affiliated with InterUSS). InterUSS welcomes contributions to change this test configuration to better align with the intent of that group.

The baseline portion of the test configuration is found in [baseline.libsonnet](utm_implementation_us_lib/baseline.libsonnet) and the environmental portion of the test configuration is found in [env_all.libsonnet](utm_implementation_us_lib/local/env_all.libsonnet). The top-level test configuration [utm_implementation_us.jsonnet](utm_implementation_us.jsonnet) combines the test baseline with the test environment to form a full test configuration.
The baseline portion of the test configuration is found in [baseline.libsonnet](utm_implementation_us/definitions/baseline_a.libsonnet) and the environmental portion of the test configuration is found in template form in [env_template_a.libsonnet](utm_implementation_us/definitions/env_template_a.libsonnet). The top-level test configuration [test_1.jsonnet](utm_implementation_us/environments/local/test_1.jsonnet) combines the test baseline with the test environment to form a full test configuration.

### Environment characteristics

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
function(env) {
// env: Specifies environment of test configuration; see usage below and contents of ./env_template_a.libsonnet for required blocks.

// See the file below (in the `schemas` folder of this repo) for the schema this file's content follows
'$content_schema': 'monitoring/uss_qualifier/configurations/configuration/USSQualifierConfiguration.json',

Expand All @@ -19,10 +21,12 @@ function(env) {
test_env_version_providers: 'test_env_version_providers',
prod_env_version_providers: 'prod_env_version_providers',
flight_planners: 'flight_planners',
flight_planners_to_clear: 'flight_planners',
flight_planners_to_clear: 'flight_planners_to_clear',
conflicting_flights: 'conflicting_flights',
priority_preemption_flights: 'conflicting_flights',
invalid_flight_intents: 'invalid_flight_intents',
non_conflicting_flights: 'non_conflicting_flights',
test_exclusions: 'test_exclusions',
dss: 'dss',
dss_instances: 'dss_instances',
mock_uss: 'mock_uss',
Expand All @@ -32,7 +36,6 @@ function(env) {
problematically_big_area: 'problematically_big_area',
system_identity: 'system_identity',
// dss_datastore_cluster: dss_datastore_cluster # TODO: Provide once local DSS uses a multi-node cluster
test_exclusions: 'test_exclusions',
},
},
},
Expand All @@ -43,9 +46,11 @@ function(env) {
non_baseline_inputs: [
'v1.test_run.resources.resource_declarations.utm_auth',
'v1.test_run.resources.resource_declarations.second_utm_auth',
'v1.test_run.resources.resource_declarations.next_env_auth',
'v1.test_run.resources.resource_declarations.test_env_version_providers',
'v1.test_run.resources.resource_declarations.prod_env_version_providers',
'v1.test_run.resources.resource_declarations.flight_planners',
'v1.test_run.resources.resource_declarations.flight_planners_to_clear',
'v1.test_run.resources.resource_declarations.dss',
'v1.test_run.resources.resource_declarations.dss_instances',
'v1.test_run.resources.resource_declarations.mock_uss',
Expand All @@ -55,7 +60,7 @@ function(env) {
],

// This block defines all the resources available in the resource pool.
// All resources defined below should be used either
// All resources defined below should generally be used either
// 1) directly in the test suite or
// 2) to create another resource in the pool
resources: {
Expand Down Expand Up @@ -253,7 +258,7 @@ function(env) {
raw_report: {},

tested_requirements: [
// Write out a human-readable reports of the F3548-21 requirements tested
// Write out a human-readable reports of the requirements tested
{
report_name: 'scd',
aggregate_participants: env.aggregate_participants,
Expand All @@ -273,13 +278,19 @@ function(env) {
'astm.f3548.v21.USS0005',
'astm.f3548.v21.SCD0005',
'astm.f3548.v21.SCD0010',
'astm.f3548.v21.SCD0015',
'astm.f3548.v21.SCD0020',
'astm.f3548.v21.SCD0025',
'astm.f3548.v21.SCD0030',
'astm.f3548.v21.SCD0035',
'astm.f3548.v21.SCD0040',
'astm.f3548.v21.SCD0045',
'astm.f3548.v21.SCD0050',
'astm.f3548.v21.SCD0075',
'astm.f3548.v21.SCD0080',
'astm.f3548.v21.SCD0085',
'astm.f3548.v21.SCD0090',
'astm.f3548.v21.SCD0095',
'astm.f3548.v21.GEN0500',
'astm.f3548.v21.USS0105,1',
'astm.f3548.v21.USS0105,3',
Expand Down Expand Up @@ -337,7 +348,6 @@ function(env) {
'interuss.automated_testing.flight_planning.Readiness',
'interuss.f3548.notification_requirements.NoDssEntityNoNotification',
'versioning.ReportSystemVersion',
'astm.f3548.v21.GEN0305',
],
},
},
Expand Down Expand Up @@ -395,7 +405,7 @@ function(env) {
count: {
// We currently expect this amount of skipped scenarios: making it an equality
// to make sure this is reduced if some scenarios start to be executed
equal_to: 7,
equal_to: 6,
},
},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
// This file contains environmental (non-baseline) parameters corresponding to the baseline in baseline_a.libsonnet.
// It is parameterized on environmental aspects; see documentation below.
// Each participant is expected to have a block in their definitions corresponding to the value of `env_code`, and the content of this block will be used.
// Top-level keys of this file's function result are used in baseline_a.libsonnet when this content is provided as `env`.

function(env_code, next_env_auth_spec, active_participants, participants_to_clear, mock_uss)
// env_code: String specifying which environment block to extract from each participant.
// next_env_auth_spec: Auth spec that should be used to obtain tokens for the next-higher environment (e.g., production) to obtain system versions in that environment
// active_participants: Array of object-per-participant with an `env_code`-keyed block containing resources for that participant (see ../participants folder).
// participants_to_clear: Same as `active_participants`, but only the `flight_planner` resource is used to clear flights for these participants before primary testing begins.
// mock_uss: A single element in the form of `active_participants` elements describing the mock_uss participant.

// Utility function to append resources from mock_uss if (and only if) it is not listed
// as an active participant (since, in that case, its resources will already be present).
local extract_from_mock_uss_if_not_active = function(field)
if (field in mock_uss[env_code]
&& std.length(std.find(mock_uss, active_participants)) == 0)
then [mock_uss[env_code][field]]
else [];

{
resource_declarations: {
// Means by which uss_qualifier can obtain authorization to make requests in an ASTM USS ecosystem.
utm_auth: {
resource_type: 'resources.communications.AuthAdapterResource',
specification: {
// To avoid putting secrets in configuration files, the auth spec (including sensitive information) will be read from the AUTH_SPEC environment variable.
environment_variable_containing_auth_spec: 'AUTH_SPEC',
scopes_authorized: [
// InterUSS flight_planning v1 automated testing API
'interuss.flight_planning.direct_automated_test',
'interuss.flight_planning.plan',
// InterUSS versioning automated testing API
'interuss.versioning.read_system_versions',
// ASTM F3548-21 USS emulation roles
'utm.strategic_coordination',
'utm.availability_arbitration',
],
},
},

// A second auth adapter, for DSS tests that require a second set of credentials for accessing the ecosystem.
// Note that the 'sub' claim of the tokens obtained through this adepter MUST be different from the first auth adapter.
second_utm_auth: {
resource_type: 'resources.communications.AuthAdapterResource',
specification: {
environment_variable_containing_auth_spec: 'AUTH_SPEC_2',
scopes_authorized: [
'utm.strategic_coordination',
],
},
},

// An auth adapter providing access to the next-higher environment for the purpose of determining system versions
// in that next environment.
next_env_auth: {
resource_type: 'resources.communications.AuthAdapterResource',
specification: {
auth_spec: next_env_auth_spec,
scopes_authorized: [
// InterUSS versioning automated testing API
'interuss.versioning.read_system_versions',
],
},
},

// Mock USS that can be used in tests for flight planning, modifying data sharing behavior and recording interactions
mock_uss: {
resource_type: 'resources.interuss.mock_uss.client.MockUSSResource',
dependencies: {
auth_adapter: 'utm_auth',
},
specification: {
participant_id: mock_uss.participant_id,
mock_uss_base_url: mock_uss[env_code].mock_uss_base_url,
},
},

// Means by which to obtain the versions of participants' systems under test (in the test environment).
test_env_version_providers: {
resource_type: 'resources.versioning.VersionProvidersResource',
dependencies: {
auth_adapter: 'utm_auth',
},
specification: {
instances: [
participant[env_code].test_env_version_provider
for participant in active_participants
if 'test_env_version_provider' in participant[env_code]
] + extract_from_mock_uss_if_not_active('test_env_version_provider'),
},
},

// Means by which to obtain the versions of participants' production systems (in a real test, these would be different URLs than test_env_version_providers above).
prod_env_version_providers: {
resource_type: 'resources.versioning.VersionProvidersResource',
dependencies: {
auth_adapter: 'next_env_auth',
},
specification: {
instances: [
participant[env_code].prod_env_version_provider
for participant in active_participants
if 'prod_env_version_provider' in participant[env_code]
],
},
},

// Set of USSs being tested as flight planners
flight_planners: {
resource_type: 'resources.flight_planning.FlightPlannersResource',
dependencies: {
auth_adapter: 'utm_auth',
},
specification: {
flight_planners: [
participant[env_code].flight_planner
for participant in active_participants
if 'flight_planner' in participant[env_code]
],
},
},

// Full set of flight planning USSs in the environment that may have dangling operational intents that need to be cleaned
flight_planners_to_clear: {
resource_type: 'resources.flight_planning.FlightPlannersResource',
dependencies: {
auth_adapter: 'utm_auth',
},
specification: {
flight_planners: [
participant[env_code].flight_planner
for participant in participants_to_clear
if 'flight_planner' in participant[env_code]
] + extract_from_mock_uss_if_not_active('flight_planner'),
},
},

dss_instances: {
resource_type: 'resources.astm.f3548.v21.DSSInstancesResource',
dependencies: {
auth_adapter: 'utm_auth',
},
specification: {
dss_instances: [
instance
for participant in active_participants
if 'dss_instances' in participant[env_code]
for instance in participant[env_code].dss_instances
],
},
},

// Location of DSS instance that can be used to verify flight planning outcomes
dss: {
resource_type: 'resources.astm.f3548.v21.DSSInstanceResource',
dependencies: {
auth_adapter: 'utm_auth',
},
specification: [
instance
for participant in active_participants
if 'dss_instances' in participant[env_code]
for instance in participant[env_code].dss_instances
][0],
},

// Datastore cluster constituting the DSS Airspace Representation
// dss_datastore_cluster: {
// resource_type: 'resources.interuss.datastore.DatastoreDBClusterResource',
// specification: {
// nodes: [
// node
// for participant in active_participants
// if 'dss_datastore_cluster_nodes' in participant[env_code]
// for node in participant[env_code].dss_datastore_cluster_nodes
// ],
// },
// },

},

aggregate_participants: {
[participant.participant_id]:
(if env_code in participant && 'aggregate_participant_ids' in participant[env_code] then
participant[env_code].aggregate_participant_ids
else
participant.aggregate_participant_ids)
for participant in active_participants
if 'aggregate_participant_ids' in participant ||
(env_code in participant && 'aggregate_participant_ids' in participant[env_code])
},

participant_requirements: {
[participant.participant_id]: participant.participant_requirements
for participant in active_participants
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
USER_GROUP := $(shell id -u):$(shell id -g)

# Find all .jsonnet configuration files
JSONNET_CONFIGS := $(shell find . -type f -name '*.jsonnet')
# Generate the corresponding .yaml filenames from the .jsonnet filenames
YAML_CONFIGS := $(patsubst %.jsonnet,%.yaml,$(JSONNET_CONFIGS))

COMMON_DEFINITIONS := $(wildcard ../definitions/*.libsonnet) $(wildcard ../participants/*.libsonnet)

.PHONY: configurations
configurations: $(YAML_CONFIGS)

build_yaml = docker container run \
-v $(CURDIR)/..:/app/monitoring/uss_qualifier/configurations/utmimplementationus \
-u ${USER_GROUP} \
-e PYTHONBUFFERED=1 \
-w /app/monitoring/uss_qualifier \
interuss/monitoring \
uv run main.py \
--config file://configurations/utmimplementationus/environments/$(1).jsonnet \
--config-output /app/monitoring/uss_qualifier/configurations/utmimplementationus/environments/$(1).yaml \
--exit-before-execution

.SECONDEXPANSION:
%.yaml: %.jsonnet $(COMMON_DEFINITIONS) $$(shell find $$(@D) -type f -name '*.libsonnet')
$(call build_yaml,$(basename $@))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# utm_implementation_us test configurations

This folder contains a subfolder per environment in which the utm_implementation_us tests may be run. In each environment subfolder, one or more tests run in that environment are defined.

To build .jsonnet definitions into a single .yaml per test configuration, from this working directory: `make configurations`
Loading
Loading