Skip to content

Commit 23b3548

Browse files
committed
DSS0210,A2-7-2,7 OIR
1 parent f5bb287 commit 23b3548

File tree

14 files changed

+521
-387
lines changed

14 files changed

+521
-387
lines changed

monitoring/uss_qualifier/resources/astm/f3548/v21/planning_area.py

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
import datetime
2-
from typing import List, Dict, Any, Optional, Self
2+
from typing import List, Optional
33

4-
from implicitdict import ImplicitDict, StringBasedDateTime
5-
from uas_standards.astm.f3548.v21.api import Volume4D
4+
from implicitdict import ImplicitDict
5+
from uas_standards.astm.f3548.v21.api import (
6+
EntityOVN,
7+
OperationalIntentState,
8+
UssBaseURL,
9+
EntityID,
10+
PutOperationalIntentReferenceParameters,
11+
ImplicitSubscriptionParameters,
12+
)
613

7-
from monitoring.monitorlib.geo import LatLngPoint, make_latlng_rect, Volume3D, Polygon
14+
from monitoring.monitorlib.geo import make_latlng_rect, Volume3D
15+
from monitoring.monitorlib.geotemporal import Volume4D
16+
from monitoring.monitorlib.temporal import Time
817
from monitoring.uss_qualifier.resources.astm.f3548.v21.subscription_params import (
918
SubscriptionParams,
1019
)
@@ -52,6 +61,46 @@ def get_new_subscription_params(
5261
notify_for_constraints=notify_for_constraints,
5362
)
5463

64+
def get_new_operational_intent_ref_params(
65+
self,
66+
key: List[EntityOVN],
67+
state: OperationalIntentState,
68+
uss_base_url: UssBaseURL,
69+
time_start: datetime.datetime,
70+
time_end: datetime.datetime,
71+
subscription_id: Optional[EntityID],
72+
implicit_sub_base_url: Optional[UssBaseURL] = None,
73+
implicit_sub_for_constraints: Optional[bool] = None,
74+
) -> PutOperationalIntentReferenceParameters:
75+
"""
76+
Build a PutOperationalIntentReferenceParameters object that can be used against the DSS OIR API.
77+
78+
The extents contained in these parameters contain a single 4DVolume, which may not be entirely realistic,
79+
but is sufficient in situations where the content of the OIR is irrelevant as long as it is valid, such
80+
as for testing authentication or parameter validation.
81+
82+
Note that this method allows building inconsistent parameters:
83+
"""
84+
return PutOperationalIntentReferenceParameters(
85+
extents=[
86+
Volume4D(
87+
volume=self.volume,
88+
time_start=Time(time_start),
89+
time_end=Time(time_end),
90+
).to_f3548v21()
91+
],
92+
key=key,
93+
state=state,
94+
uss_base_url=uss_base_url,
95+
subscription_id=subscription_id,
96+
new_subscription=ImplicitSubscriptionParameters(
97+
uss_base_url=implicit_sub_base_url,
98+
notify_for_constraints=implicit_sub_for_constraints,
99+
)
100+
if implicit_sub_base_url
101+
else None,
102+
)
103+
55104

56105
class PlanningAreaResource(Resource[PlanningAreaSpecification]):
57106
specification: PlanningAreaSpecification
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
from .subscription_validation import SubscriptionValidation
22
from .subscription_simple import SubscriptionSimple
3-
from .authentication_validation import AuthenticationValidation
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .authentication_validation import AuthenticationValidation

monitoring/uss_qualifier/scenarios/astm/utm/dss/authentication_validation.md renamed to monitoring/uss_qualifier/scenarios/astm/utm/dss/authentication/authentication_validation.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ Note that this does not cover authorization.
1010

1111
### dss
1212

13-
[`DSSInstanceResource`](../../../../resources/astm/f3548/v21/dss.py) to be tested in this scenario.
13+
[`DSSInstanceResource`](../../../../../resources/astm/f3548/v21/dss.py) to be tested in this scenario.
1414

1515
### id_generator
1616

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

1919
### planning_area
2020

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

2323
## Setup test case
2424

25-
### [Ensure clean workspace test step](clean_workspace.md)
25+
### [Ensure clean workspace test step](../clean_workspace.md)
2626

2727
This step ensures that no entity with the known test IDs exists in the DSS.
2828

@@ -34,131 +34,131 @@ This test case ensures that the DSS properly authenticates requests to all its e
3434

3535
#### 🛑 Unauthorized requests return the proper error message body check
3636

37-
If the DSS under test does not return a proper error message body when an unauthorized request is received, it fails to properly implement the OpenAPI specification that is part of **[astm.f3548.v21.DSS0005,5](../../../../requirements/astm/f3548/v21.md)**.
37+
If the DSS under test does not return a proper error message body when an unauthorized request is received, it fails to properly implement the OpenAPI specification that is part of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.
3838

3939
#### 🛑 Create subscription with missing credentials check
4040

41-
If the DSS under test allows the creation of a subscription without any credentials being presented, it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
41+
If the DSS under test allows the creation of a subscription without any credentials being presented, it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
4242

4343
#### 🛑 Create subscription with invalid credentials check
4444

4545
If the DSS under test allows the creation of a subscription with credentials that are well-formed but invalid,
46-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
46+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
4747

4848
#### 🛑 Create subscription with missing scope check
4949

5050
If the DSS under test allows the creation of a subscription with valid credentials but a missing scope,
51-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
51+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
5252

5353
#### 🛑 Create subscription with incorrect scope check
5454

5555
If the DSS under test allows the creation of a subscription with valid credentials but an incorrect scope,
56-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
56+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
5757

5858
#### 🛑 Create subscription with valid credentials check
5959

6060
If the DSS does not allow the creation of a subscription when valid credentials are presented,
61-
it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../requirements/astm/f3548/v21.md)**.
61+
it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.
6262

6363
#### 🛑 Get subscription with missing credentials check
6464

65-
If the DSS under test allows the fetching of a subscription without any credentials being presented, it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
65+
If the DSS under test allows the fetching of a subscription without any credentials being presented, it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
6666

6767
#### 🛑 Get subscription with invalid credentials check
6868

6969
If the DSS under test allows the fetching of a subscription with credentials that are well-formed but invalid,
70-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
70+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
7171

7272
#### 🛑 Get subscription with missing scope check
7373

7474
If the DSS under test allows the fetching of a subscription with valid credentials but a missing scope,
75-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
75+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
7676

7777
#### 🛑 Get subscription with incorrect scope check
7878

7979
If the DSS under test allows the fetching of a subscription with valid credentials but an incorrect scope,
80-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
80+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
8181

8282
#### 🛑 Get subscription with valid credentials check
8383

8484
If the DSS does not allow fetching a subscription when valid credentials are presented,
85-
it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../requirements/astm/f3548/v21.md)**.
85+
it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.
8686

8787
#### 🛑 Mutate subscription with missing credentials check
8888

8989
If the DSS under test allows the mutation of a subscription without any credentials being presented,
90-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
90+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
9191

9292
#### 🛑 Mutate subscription with invalid credentials check
9393

9494
If the DSS under test allows the mutation of a subscription with credentials that are well-formed but invalid,
95-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
95+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
9696

9797
#### 🛑 Mutate subscription with missing scope check
9898

9999
If the DSS under test allows the mutation of a subscription with valid credentials but a missing scope,
100-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
100+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
101101

102102
#### 🛑 Mutate subscription with incorrect scope check
103103

104104
If the DSS under test allows the mutation of a subscription with valid credentials but an incorrect scope,
105-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
105+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
106106

107107
#### 🛑 Mutate subscription with valid credentials check
108108

109109
If the DSS does not allow the mutation of a subscription when valid credentials are presented,
110-
it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../requirements/astm/f3548/v21.md)**.
110+
it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.
111111

112112
#### 🛑 Delete subscription with missing credentials check
113113

114114
If the DSS under test allows the deletion of a subscription without any credentials being presented,
115-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
115+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
116116

117117
#### 🛑 Delete subscription with invalid credentials check
118118

119119
If the DSS under test allows the deletion of a subscription with credentials that are well-formed but invalid,
120-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
120+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
121121

122122
#### 🛑 Delete subscription with missing scope check
123123

124124
If the DSS under test allows the deletion of a subscription with valid credentials but a missing scope,
125-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
125+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
126126

127127
#### 🛑 Delete subscription with incorrect scope check
128128

129129
If the DSS under test allows the deletion of a subscription with valid credentials but an incorrect scope,
130-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
130+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
131131

132132
#### 🛑 Delete subscription with valid credentials check
133133

134134
If the DSS does not allow the deletion of a subscription when valid credentials are presented,
135-
it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../requirements/astm/f3548/v21.md)**.
135+
it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.
136136

137137
#### 🛑 Search subscriptions with missing credentials check
138138

139139
If the DSS under test allows searching for subscriptions without any credentials being presented,
140-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
140+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
141141

142142
#### 🛑 Search subscriptions with invalid credentials check
143143

144144
If the DSS under test allows searching for subscriptions with credentials that are well-formed but invalid,
145-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
145+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
146146

147147
#### 🛑 Search subscriptions with missing scope check
148148

149149
If the DSS under test allows searching for subscriptions with valid credentials but a missing scope,
150-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
150+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
151151

152152
#### 🛑 Search subscriptions with incorrect scope check
153153

154154
If the DSS under test allows searching for subscriptions with valid credentials but an incorrect scope,
155-
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../requirements/astm/f3548/v21.md)**.
155+
it is in violation of **[astm.f3548.v21.DSS0210,A2-7-2,7](../../../../../requirements/astm/f3548/v21.md)**.
156156

157157
#### 🛑 Search subscriptions with valid credentials check
158158

159159
If the DSS does not allow searching for subscriptions when valid credentials are presented,
160-
it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../requirements/astm/f3548/v21.md)**.
160+
it is in violation of **[astm.f3548.v21.DSS0005,5](../../../../../requirements/astm/f3548/v21.md)**.
161161

162-
## [Cleanup](./clean_workspace.md)
162+
## [Cleanup](../clean_workspace.md)
163163

164164
The cleanup phase of this test scenario removes the subscription with the known test ID if it has not been removed before.

0 commit comments

Comments
 (0)