Skip to content

Commit

Permalink
[uss_qualifier] Add rid mock v22a and switch local_test default rid v…
Browse files Browse the repository at this point in the history
…ersion to v22a
  • Loading branch information
barroco committed Jun 23, 2023
1 parent 982ae5a commit 64a8f7b
Show file tree
Hide file tree
Showing 12 changed files with 110 additions and 26 deletions.
12 changes: 7 additions & 5 deletions monitoring/mock_uss/run_locally_riddp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,30 @@ if [ -z "${DO_NOT_BUILD_MONITORING}" ]; then
fi

AUTH="DummyOAuth(http://host.docker.internal:8085/token,uss1)"
DSS="http://host.docker.internal:8082"
DSS=${MOCK_USS_DSS_URL:-"http://host.docker.internal:8082"}
RID_VERSION=${MOCK_USS_RID_VERSION:-"F3411-19"}
PUBLIC_KEY="/var/test-certs/auth2.pem"
AUD=${MOCK_USS_TOKEN_AUDIENCE:-localhost,host.docker.internal}
container_name="mock_uss_riddp"
CONTAINER_NAME=${MOCK_CONTAINER_NAME:-"mock_uss_riddp"}

PORT=8073
PORT=${PORT:-8073}

if [ "$CI" == "true" ]; then
docker_args="--add-host host.docker.internal:host-gateway" # Required to reach other containers in Ubuntu (used for Github Actions)
else
docker_args="-it"
fi

docker container rm -f ${container_name} || echo "No pre-existing ${container_name} container to remove"
docker container rm -f "${CONTAINER_NAME}" || echo "No pre-existing ${CONTAINER_NAME} container to remove"

# shellcheck disable=SC2086
docker run ${docker_args} --name ${container_name} \
docker run ${docker_args} --name "${CONTAINER_NAME}" \
-e MOCK_USS_AUTH_SPEC="${AUTH}" \
-e MOCK_USS_DSS_URL="${DSS}" \
-e MOCK_USS_PUBLIC_KEY="${PUBLIC_KEY}" \
-e MOCK_USS_TOKEN_AUDIENCE="${AUD}" \
-e MOCK_USS_SERVICES="riddp" \
-e MOCK_USS_RID_VERSION="${RID_VERSION}" \
-p ${PORT}:5000 \
-v "${SCRIPT_DIR}/../../build/test-certs:/var/test-certs:ro" \
"$@" \
Expand Down
11 changes: 11 additions & 0 deletions monitoring/mock_uss/run_locally_riddp_v22a.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
if [ -z "${DO_NOT_BUILD_MONITORING}" ]; then
"${SCRIPT_DIR}/../build.sh" || exit 1
fi

MOCK_CONTAINER_NAME="mock_uss_riddp_v22a" \
MOCK_USS_RID_VERSION="F3411-22a" \
PORT=8083 \
"${SCRIPT_DIR}/run_locally_riddp.sh"
12 changes: 7 additions & 5 deletions monitoring/mock_uss/run_locally_ridsp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ if [ -z "${DO_NOT_BUILD_MONITORING}" ]; then
fi

AUTH="DummyOAuth(http://host.docker.internal:8085/token,uss1)"
DSS="http://host.docker.internal:8082"
DSS=${MOCK_USS_DSS_URL:-"http://host.docker.internal:8082"}
RID_VERSION=${MOCK_USS_RID_VERSION:-"F3411-19"}
PUBLIC_KEY="/var/test-certs/auth2.pem"
AUD=${MOCK_USS_TOKEN_AUDIENCE:-localhost,host.docker.internal}
container_name="mock_uss_ridsp"
CONTAINER_NAME=${MOCK_CONTAINER_NAME:-"mock_uss_riddp"}

PORT=8071
PORT=${PORT:-8071}
BASE_URL="http://${MOCK_USS_TOKEN_AUDIENCE:-host.docker.internal}:${PORT}"

if [ "$CI" == "true" ]; then
Expand All @@ -20,16 +21,17 @@ else
docker_args="-it"
fi

docker container rm -f ${container_name} || echo "No pre-existing ${container_name} container to remove"
docker container rm -f "${CONTAINER_NAME}" || echo "No pre-existing ${CONTAINER_NAME} container to remove"

# shellcheck disable=SC2086
docker run ${docker_args} --name ${container_name} \
docker run ${docker_args} --name "${CONTAINER_NAME}" \
-e MOCK_USS_AUTH_SPEC="${AUTH}" \
-e MOCK_USS_DSS_URL="${DSS}" \
-e MOCK_USS_PUBLIC_KEY="${PUBLIC_KEY}" \
-e MOCK_USS_TOKEN_AUDIENCE="${AUD}" \
-e MOCK_USS_BASE_URL="${BASE_URL}" \
-e MOCK_USS_SERVICES="ridsp" \
-e MOCK_USS_RID_VERSION="${RID_VERSION}" \
-p ${PORT}:5000 \
-v "${SCRIPT_DIR}/../../build/test-certs:/var/test-certs:ro" \
"$@" \
Expand Down
11 changes: 11 additions & 0 deletions monitoring/mock_uss/run_locally_ridsp_v22a.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
if [ -z "${DO_NOT_BUILD_MONITORING}" ]; then
"${SCRIPT_DIR}/../build.sh" || exit 1
fi

MOCK_CONTAINER_NAME="mock_uss_ridsp_v22a" \
MOCK_USS_RID_VERSION="F3411-22a" \
PORT=8081 \
"${SCRIPT_DIR}/run_locally_ridsp.sh"
2 changes: 2 additions & 0 deletions monitoring/mock_uss/start_all_local_mocks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@ monitoring/mock_uss/run_locally_tracer.sh -d
monitoring/mock_uss/wait_for_mock_uss.sh mock_uss_scdsc
monitoring/mock_uss/wait_for_mock_uss.sh mock_uss_ridsp
monitoring/mock_uss/wait_for_mock_uss.sh mock_uss_riddp
monitoring/mock_uss/wait_for_mock_uss.sh mock_uss_ridsp_v22a
monitoring/mock_uss/wait_for_mock_uss.sh mock_uss_riddp_v22a
monitoring/mock_uss/wait_for_mock_uss.sh mock_uss_geoawareness
monitoring/mock_uss/wait_for_mock_uss.sh mock_uss_tracer
2 changes: 1 addition & 1 deletion monitoring/mock_uss/stop_all_local_mocks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ else
fi
cd "${BASEDIR}/../.." || exit 1

docker container rm -f mock_uss_scdsc mock_uss_ridsp mock_uss_riddp mock_uss_geoawareness mock_uss_atproxy_client mock_uss_tracer
docker container rm -f mock_uss_scdsc mock_uss_ridsp mock_uss_ridsp_v22a mock_uss_riddp mock_uss_riddp_v22a mock_uss_geoawareness mock_uss_atproxy_client mock_uss_tracer
32 changes: 30 additions & 2 deletions monitoring/uss_qualifier/configurations/dev/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,38 @@ common:
environment_variable_containing_auth_spec: AUTH_SPEC

net_rid:
netrid_service_providers:
netrid_service_providers_v19:
resource_type: resources.netrid.NetRIDServiceProviders
dependencies:
auth_adapter: utm_auth
specification:
service_providers:
- participant_id: uss1
injection_base_url: http://host.docker.internal:8071/ridsp/injection
netrid_observers:
netrid_service_providers_v22a:
resource_type: resources.netrid.NetRIDServiceProviders
dependencies:
auth_adapter: utm_auth
specification:
service_providers:
- participant_id: uss1
injection_base_url: http://host.docker.internal:8081/ridsp/injection
netrid_observers_v19:
resource_type: resources.netrid.NetRIDObserversResource
dependencies:
auth_adapter: utm_auth
specification:
observers:
- participant_id: uss2
observation_base_url: http://host.docker.internal:8073/riddp/observation
netrid_observers_v22a:
resource_type: resources.netrid.NetRIDObserversResource
dependencies:
auth_adapter: utm_auth
specification:
observers:
- participant_id: uss2
observation_base_url: http://host.docker.internal:8083/riddp/observation
netrid_dss_instances_v19:
resource_type: resources.astm.f3411.DSSInstancesResource
dependencies:
Expand All @@ -35,6 +51,18 @@ net_rid:
- participant_id: uss2
rid_version: F3411-19
base_url: http://host.docker.internal:8082
netrid_dss_instances_v22a:
resource_type: resources.astm.f3411.DSSInstancesResource
dependencies:
auth_adapter: utm_auth
specification:
dss_instances:
- participant_id: uss1
rid_version: F3411-22a
base_url: http://host.docker.internal:8082/rid/v2/
- participant_id: uss2
rid_version: F3411-22a
base_url: http://host.docker.internal:8082/rid/v2/

f3548:
flight_planners:
Expand Down
7 changes: 4 additions & 3 deletions monitoring/uss_qualifier/configurations/dev/local_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@
"adjacent_circular_storage_config": "adjacent_circular_storage_config",
"kml_flights_data": "kml_flights_data",
"kml_storage_config": "kml_storage_config",
"service_providers": "netrid_service_providers",
"observers": "netrid_observers",
"service_providers": "netrid_service_providers_v22a",
"observers": "netrid_observers_v22a",
"evaluation_configuration": "netrid_observation_evaluation_configuration",
"flight_planners": "flight_planners",
"conflicting_flights": "conflicting_flights",
"priority_preemption_flights": "priority_preemption_flights",
"invalid_flight_intents": "invalid_flight_intents",
"invalid_flight_auth_flights": "invalid_flight_auth_flights",
"dss": "dss",
"netrid_dss_instances_v19": "netrid_dss_instances_v19"
"netrid_dss_instances_v19": "netrid_dss_instances_v19",
"netrid_dss_instances_v22a": "netrid_dss_instances_v22a"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions monitoring/uss_qualifier/configurations/dev/netrid_v22a.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ v1:
specification:
service_providers:
- participant_id: uss1
injection_base_url: http://host.docker.internal:8071/ridsp/injection
injection_base_url: http://host.docker.internal:8081/ridsp/injection # USS mock ridsp_v22a
observers:
resource_type: resources.netrid.NetRIDObserversResource
dependencies:
auth_adapter: utm_auth
specification:
observers:
- participant_id: uss2
observation_base_url: http://host.docker.internal:8073/riddp/observation
observation_base_url: http://host.docker.internal:8083/riddp/observation # USS mock riddp_v22a
observation_evaluation_configuration:
resource_type: resources.netrid.EvaluationConfigurationResource
specification: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
"adjacent_circular_storage_config": "adjacent_circular_storage_config",
"kml_flights_data": "kml_flights_data",
"kml_storage_config": "kml_storage_config",
"service_providers": "netrid_service_providers",
"observers": "netrid_observers",
"service_providers": "netrid_service_providers_v22a",
"observers": "netrid_observers_v22a",
"evaluation_configuration": "netrid_observation_evaluation_configuration",
"flight_planners": "flight_planners",
"conflicting_flights": "conflicting_flights",
"priority_preemption_flights": "priority_preemption_flights",
"invalid_flight_auth_flights": "invalid_flight_auth_flights",
"dss": "dss",
"netrid_dss_instances_v19": "netrid_dss_instances_v19"
"netrid_dss_instances_v22a": "netrid_dss_instances_v22a"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,38 @@ uspace:

net_rid:
$ref: '#/common'
netrid_service_providers:
netrid_service_providers_v19:
resource_type: resources.netrid.NetRIDServiceProviders
dependencies:
auth_adapter: utm_auth
specification:
service_providers:
- participant_id: uss1
injection_base_url: http://localhost:8071/ridsp/injection
netrid_observers:
netrid_service_providers_v22a:
resource_type: resources.netrid.NetRIDServiceProviders
dependencies:
auth_adapter: utm_auth
specification:
service_providers:
- participant_id: uss1
injection_base_url: http://localhost:8081/ridsp/injection
netrid_observers_v19:
resource_type: resources.netrid.NetRIDObserversResource
dependencies:
auth_adapter: utm_auth
specification:
observers:
- participant_id: uss2
observation_base_url: http://localhost:8073/riddp/observation
netrid_observers_v22a:
resource_type: resources.netrid.NetRIDObserversResource
dependencies:
auth_adapter: utm_auth
specification:
observers:
- participant_id: uss2
observation_base_url: http://localhost:8083/riddp/observation
netrid_observation_evaluation_configuration:
resource_type: resources.netrid.EvaluationConfigurationResource
specification: {}
Expand All @@ -41,7 +57,18 @@ net_rid:
- participant_id: uss2
rid_version: F3411-19
base_url: http://localhost:8082

netrid_dss_instances_v22a:
resource_type: resources.astm.f3411.DSSInstancesResource
dependencies:
auth_adapter: utm_auth
specification:
dss_instances:
- participant_id: uss1
rid_version: F3411-22a
base_url: http://localhost:8082/rid/v2/
- participant_id: uss2
rid_version: F3411-22a
base_url: http://localhost:8082/rid/v2/
net_rid_sims:
adjacent_circular_flights_data:
resource_type: resources.netrid.FlightDataResource
Expand Down
4 changes: 2 additions & 2 deletions monitoring/uss_qualifier/suites/dev/local_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ resources:
invalid_flight_intents: resources.flight_planning.FlightIntentsResource
invalid_flight_auth_flights: resources.flight_planning.FlightIntentsResource
dss: resources.astm.f3548.v21.DSSInstanceResource
netrid_dss_instances_v22a: resources.astm.f3411.DSSInstancesResource

netrid_dss_instances_v19: resources.astm.f3411.DSSInstancesResource
actions:
- test_suite:
suite_type: suites.interuss.generate_test_data
Expand All @@ -39,5 +39,5 @@ actions:
service_providers: service_providers
observers: observers
evaluation_configuration: evaluation_configuration
netrid_dss_instances: netrid_dss_instances_v19
netrid_dss_instances: netrid_dss_instances_v22a
on_failure: Continue

0 comments on commit 64a8f7b

Please sign in to comment.