| 1 |
from globus_sdk.testing.models import RegisteredResponse, ResponseSet |
| 2 |
|
| 3 |
from .._common import ENDPOINT_ID, SUBSCRIPTION_ID |
| 4 |
|
| 5 |
ENDPOINT_CONFIG = """ |
| 6 |
display_name: My Endpoint |
| 7 |
engine: |
| 8 |
type: GlobusComputeEngine |
| 9 |
""" |
| 10 |
|
| 11 |
DEFAULT_RESPONSE_DOC = { |
| 12 |
"uuid": ENDPOINT_ID, |
| 13 |
"name": "my-endpoint", |
| 14 |
"display_name": "My Endpoint", |
| 15 |
"multi_user": False, |
| 16 |
"public": False, |
| 17 |
"endpoint_config": ENDPOINT_CONFIG.strip(), |
| 18 |
"user_config_template": "", |
| 19 |
"user_config_schema": {}, |
| 20 |
"description": "My endpoint description", |
| 21 |
"hostname": "my-hostname", |
| 22 |
"local_user": "user1", |
| 23 |
"ip_address": "140.221.112.13", |
| 24 |
"endpoint_version": "2.31.0", |
| 25 |
"sdk_version": "2.31.0", |
| 26 |
"subscription_uuid": SUBSCRIPTION_ID, |
| 27 |
} |
| 28 |
|
| 29 |
RESPONSES = ResponseSet( |
| 30 |
metadata={"endpoint_id": ENDPOINT_ID}, |
| 31 |
default=RegisteredResponse( |
| 32 |
service="compute", |
| 33 |
path=f"/v2/endpoints/{ENDPOINT_ID}", |
| 34 |
method="GET", |
| 35 |
json=DEFAULT_RESPONSE_DOC, |
| 36 |
), |
| 37 |
) |