Skip to content

Commit

Permalink
[dss] update dss version to v0.15.0-rc1, add required scope to mock_u…
Browse files Browse the repository at this point in the history
…ss (#681)
  • Loading branch information
Shastick authored May 7, 2024
1 parent 5257005 commit d8b0c25
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/dev/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ services:

dss:
hostname: dss.uss1.localutm
image: interuss/dss:v0.14.0
image: interuss/dss:v0.15.0-rc1
volumes:
- $PWD/../test-certs:/var/test-certs:ro
- dss_component_coordination:/var/dss_component_coordination
Expand Down
4 changes: 2 additions & 2 deletions monitoring/monitorlib/clients/scd.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def create_operational_intent_reference(
url = "/dss/v1/operational_intent_references/{}".format(id)
subject = f"createOperationalIntentReference to {url}"
query = fetch.query_and_describe(
utm_client, "PUT", url, json=req, scope=scd.SCOPE_SC
utm_client, "PUT", url, json=req, scopes=[scd.SCOPE_SC, scd.SCOPE_CM_SA]
)
if query.status_code != 200 and query.status_code != 201:
raise QueryError(
Expand Down Expand Up @@ -84,7 +84,7 @@ def update_operational_intent_reference(
url = "/dss/v1/operational_intent_references/{}/{}".format(id, ovn)
subject = f"updateOperationalIntentReference to {url}"
query = fetch.query_and_describe(
utm_client, "PUT", url, json=req, scope=scd.SCOPE_SC
utm_client, "PUT", url, json=req, scopes=[scd.SCOPE_SC, scd.SCOPE_CM_SA]
)
if query.status_code != 200 and query.status_code != 201:
raise QueryError(
Expand Down
1 change: 1 addition & 0 deletions monitoring/monitorlib/infrastructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"dss.write.identification_service_areas",
"dss.read.identification_service_areas",
"utm.strategic_coordination",
"utm.conformance_monitoring_sa",
"utm.constraint_management",
"utm.constraint_consumption",
]
Expand Down
10 changes: 9 additions & 1 deletion monitoring/uss_qualifier/resources/astm/f3548/v21/dss.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,15 @@ def put_op_intent(
Raises:
* QueryError: if request failed, if HTTP status code is different than 200 or 201, or if the parsing of the response failed.
"""
scopes = [Scope.StrategicCoordination]
self._uses_scope(Scope.StrategicCoordination)
if state in [
OperationalIntentState.Nonconforming,
OperationalIntentState.Contingent,
]:
scopes.append(Scope.ConformanceMonitoringForSituationalAwareness)
self._uses_scope(Scope.ConformanceMonitoringForSituationalAwareness)

oi_uuid = str(uuid.uuid4()) if oi_id is None else oi_id
create = ovn is None
if create:
Expand Down Expand Up @@ -299,7 +307,7 @@ def put_op_intent(
url,
query_type,
self.participant_id,
scope=Scope.StrategicCoordination,
scopes=scopes,
json=req,
)
if (create and query.status_code == 201) or (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def __init__(
{
Scope.StrategicCoordination: "search for operational intent references to verify outcomes of planning activities and retrieve operational intent details",
Scope.AvailabilityArbitration: "declare virtual USS down in DSS",
Scope.ConformanceMonitoringForSituationalAwareness: "create operational intent references in an off-nominal state",
}
)

Expand Down

0 comments on commit d8b0c25

Please sign in to comment.