Debian Codegraph @

src/globus_sdk/testing/data/globus_connect_server/create_storage_gateway.py

raw
1 from globus_sdk.testing.models import RegisteredResponse, ResponseSet
2
3 metadata = {
4 "id": "daa09846-eb92-11e9-b89c-9cb6d0d9fd63",
5 "display_name": "example gateway 1",
6 }
7
8 RESPONSES = ResponseSet(
9 metadata=metadata,
10 default=RegisteredResponse(
11 service="gcs",
12 method="POST",
13 path="/storage_gateways",
14 json={
15 "DATA_TYPE": "result#1.0.0",
16 "http_response_code": 200,
17 "detail": "success",
18 "message": "Operation successful",
19 "code": "success",
20 "data": [
21 {
22 "DATA_TYPE": "storage_gateway#1.0.0",
23 "id": metadata["id"],
24 "display_name": metadata["display_name"],
25 "connector_id": "145812c8-decc-41f1-83cf-bb2a85a2a70b",
26 "high_assurance": False,
27 "authentication_assurance_timeout": 15840,
28 "authentication_timeout_mins": 15840,
29 "allowed_domains": ["example.edu"],
30 "mapping": "username_without_domain",
31 "require_high_assurance": False,
32 "restrict_paths": {
33 "DATA_TYPE": "path_restrictions#1.0.0",
34 "read": ["/"],
35 },
36 "policies": {
37 "DATA_TYPE": "posix_storage_gateway#1.0.0",
38 "groups_allow": ["globus"],
39 "groups_deny": ["nonglobus"],
40 },
41 "users_allow": ["user1"],
42 "users_deny": ["user2"],
43 }
44 ],
45 },
46 ),
47 validation_error=RegisteredResponse(
48 path="/storage_gateways",
49 service="gcs",
50 method="POST",
51 status=422,
52 json={
53 "DATA_TYPE": "result#1.0.0",
54 "code": "unprocessable_entity",
55 "detail": "",
56 "http_response_code": 422,
57 "message": "Data Validation Error",
58 },
59 metadata={
60 "http_status": 422,
61 "code": "unprocessable_entity",
62 "message": "Data Validation Error",
63 },
64 ),
65 )